dlopen() / dlsym() problem

Hi all,
Is there something special to do when building a shared library so that it’s functions can be retrieved using dlsym() from a client code?
In the client code, the dlopen() call returns a valid handle but all the dlsym() calls return NULL. I tried RTLD_NOW and RTLD_NOW | RTLD_GLOBAL as the mode for dlopen() and none of the 2 worked. dlerror() always reports “Symbol not found”. Any insight?

Could you please post some more output on how you are building your shared object, is it C or c++ code, how do you build the application that does the dlopen() call?

There is a linker switch -Wl,-E that makes all symbols availible in the resulting lib IIRC.


Working now.
The lib is C++ and I forgot the extern “C” wrapper.
The linker switch -Wl,-E was not needed.