Hi g++ and AIX users, I am facing problem in using a so inan EXE . I created the so. Versions: g++ 4.4.1 on AIX 5.2 system.
The way .so is built: .so is statically linking with stdc++, gcc, gcc_eh . g++ -D_DEBUG -g -shared -o libiif.so -O3 -v ../src/BMCIIF_Mutex.d ../src/BMCIIF_AutoMutex.d ../src/CXMLReader.d ../src/BMCIIF_Statistics.d ../src/BMCIIF_Logger.d ../src/BMCIIF_Utilities.d -L/usr/lib/threads -L../lib_aix -L../lib -L/usr/local/lib -L/usr/lib -Wl,-bstatic -lstdc++ -lgcc -lgcc_eh -Wl,-bdynamic -lpthread -liiapi -lnsl -lm -lc -ltli So builds successfully. The EXE is using it like this: g++ -o EXENAME -O3 -v -L/usr/lib/threads -L/usr/local/lib -L/usr/lib -L./../../libs/aix -lstdc++ -lgcc -lgcc_eh -liiapi -lm -lnsl -lpthread -lc -Wl,-blibpath:/home/ngujarat/work/BiiF/libs/aix -Wl,-brtl -liif ../src/THIRDPARTYEMSReceiver.o ../src/BiiMain.o PROBLEM: But EXE compilation fails with "ld: 0711-317 ERROR: Undefined symbol:" Errors for some constructors. Destructors, static data members in a class. Perhaps these are not referenced directly in course code. NOTE: I ran "nm" on libiif.so for Undefined symbols and they are not found in the SO. Article details below are not addressing this issue: http://www-128.ibm.com/developerworks/eserver/articles/gnu.html WHY Is this happening? Anything wrong in building SO or wrong use of SO? Flags missing? -Wl,-G with -Wl,-brtl was given , exe builds delaying the resolution at run time, but when EXE is run , it crashes. Thanks Nilesh _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus