You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdevelop/languages/cpp/debugger/tests/dll/main.cpp

16 lines
216 B

#include <dlfcn.h>
typedef int (*ft)(int);
int main()
{
void* handle = dlopen("./libhelper.so", RTLD_LAZY);
void* sym = dlsym(handle, "helper");
ft f = (ft)sym;
f(10);
f(15);
return 0;
}