Christopher Lintz writes:

> Can someone offer direction to this strange problem.  I have built a 4 line function 
>and built it into a shared library using libtool.  I call the library with dlopen() 
>(which is succesful), but when I call dlsym() it can't find the symbol for the 
>function.  However, If i go into the gdb debugger and display the functions (info 
>functions) in the symbol table, my function is there!!!  I can even call the function 
>in gdb (call foo(3) ).

C++ uses name mangling to alter the name of linker symbols to allow for
function overloading.  You could use 'nm' to find the bare symbol name but
it's probably better to wrap your function declarations into extern "C"
blocks to make the symbols predictable across platforms.

-- 
Peter Eisentraut   [EMAIL PROTECTED]   http://funkturm.homeip.net/~peter


_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool

Reply via email to