dynamic class loading doesn't find my functions!?
hiho@ll
i'm using dlopen and dlsym to load a class dynamically everything works fine, but my main prog doesn't recognize the functions included by dlsym!! compileerror: /tmp/cchUTQgK.o(.text+0x185a): In function `main': : undefined reference to `myserv::init(int, int, int, int, int, int, int, int)' /tmp/cchUTQgK.o(.text+0x1977): In function `main': : undefined reference to `myserv::start()' collect2: ld returned 1 exit status i understand why it doesn't find the functions (http://www.linuxjournal.com/article/3687), but although i'm using extern "C" directive (in my server.cpp class (not the main app class) i have extern "C"{ function codings }) anyone knows what the problem could be? maybe it's a compilerflag i don't know or do i have to use extern "C" in the server.h too? thx@ll |
the compiler option -shared was missing :rolleyes:
|
All times are GMT -5. The time now is 07:15 PM. |