代码示例:
#include <stdio.h> #include <stdlib.h> #include <dlfcn.h> typedef int(*Func)(void*); int callFunc(dtInterp_t a) { void* handle = dlopen("*.so", RTLD_LAZY); Func func = (Func)dlsym(handle, "funcName"); func(a); dlclose(handle); return 0; }
标签:调用,handle,int,void,so,Func,Linux,include From: https://www.cnblogs.com/yyqng/p/17373089.html