#include #include int main() { void *handle; void (*hw)(void); void (*hh)(void); printf("Loading \"libhello.dylib\" .....\n"); handle = dlopen("/Users/fujiik/sandbox/mypkg/src/libdl/test/libhello.dylib",RTLD_LAZY); hw = dlsym(handle,"_helloworld"); (*hw)(); hh = dlsym(handle,"_hellohoge"); (*hh)(); dlclose(handle); return 0; }