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.
16 lines
216 B
16 lines
216 B
15 years ago
|
#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;
|
||
|
}
|