include
include
include
include
typedef int (*CAC_FUNC)(int, int);
int main()
{
void *handle;
char *error;
CAC_FUNC cac_func = NULL;
handle = dlopen(“./test.so”, RTLD_LAZY);
if (!handle) {
fprintf(stderr, “%s\n”, dlerror());
exit(EXIT_FAILURE);
}
dlerror();
CAC_FUNC c = (CAC_FUNC)dlsym(handle, "add");
//if ((error = dlerror()) != NULL)fprintf(stderr, "%s\n", error);dlclose(handle);
std::cout<