Hi all, I have been facing this issue, when I try to use the 'dlopen()' to load a library (libtest.so) in my exe, I get an "undefined symbol" error. I use the "dlopen" with the flag 'RTLD_LAZY'. I have been using the same source code(both for the main exe and the library 'libtest.so') in another machine. There was no issue in that machine. I think it might be something to do with the 'g++' flags I use to get the library file ('libtest.so'). But I am not sure. The GCC and linux versions of the new machine in which I faced the issue are, --------------------------------------------------------------------------------------------------------------------------- $ lsb_release -a LSB Version: 1.3 Distributor ID: RedHatEnterpriseAS Description: Red Hat Enterprise Linux AS release 3 (Taroon Update 6) Release: 3 Codename: TaroonUpdate6 $gcc --version gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-53) ----------------------------------------------------------------------------------------------------------- the makefile entry for the main program linking is.. g++ -o ../run/main main.o -Wl,--export-dynamic -L/usr/local/lib -L/home/user/lib -ldl -lnsl -lpthread -lrt the makefile entry for the library file (libtest.so) is, libtool --mode=link g++ -shared -o ../run/libtest.so test.o config.o I dint change the makefile entries that were from the old machine, since it compiled successfully. For your information, my old machine's linux and GCC version details are, ------------------------------------------------------------------------------------------------------------- $ lsb_release -a LSB Version: 1.3 Distributor ID: RedHat Description: Red Hat Linux release 9 (Shrike) Release: 9 Codename: Shrike $ gcc --version gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) --------------------------------------------------------------------------------------------------------------- thanks for any kind of help or pointers! --david -- View this message in context: http://www.nabble.com/dlopen%28%29-returns-undefined-symbol-for-library-w--RTLD_LAZY-tp24621028p24621028.html Sent from the gcc - Help mailing list archive at Nabble.com.