#include #include typedef void (* doitfunc)(); int main(int argc, char **argv) { void *handle = dlopen("./festival_lib.so", RTLD_NOW | RTLD_GLOBAL); if ( ! handle ) { printf("Opening lib failed: %s\n", dlerror()); return -1; } doitfunc func = (doitfunc)dlsym(handle, "do_it"); func(); return 0; }