When I compile my server code (buildserver tuxedo 9.1 on AIX with xlC v11) using my atmi++ library, the linker can't resolv the symbol .tpinit.
CC=xlC_r CFLAGS="-I /opt/bea/tuxedo9.1/include -I ../include/ -DHAVE_CONFIG_H -L ../lib/ " buildserver -v -s TOUPPER -o ../app//SIMPSERV++ -f SIMPSERV++.o -l '-latmi++ -latmiutl++ -lfml++'
xlC_r -brtl -qstaticinline -qrtti=all -I /opt/bea/tuxedo9.1/include -I ../include/ -DHAVE_CONFIG_H -L ../lib/ -I$TUXDIR/include -o ../app//SIMPSERV++ BS-31c0ac.c -L${TUXDIR}/lib SIMPSERV++.o -brtl -qstaticinline -ltux -lbuft -lfml -lfml32 -lengine -lpthread -latmi++ -latmiutl++ -lfml++
...
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-317 ERROR: Undefined symbol: .tpinit
CMDTUX_CAT:1832: ERROR: can't execute xlC_r -brtl -qstaticinline -qrtti=all -I /opt/bea/tuxedo9.1/include -I ../include/ -DHAVE_CONFIG_H -L ../lib/ -I$TUXDIR/include -o ../app//SIMPSERV++ BS-31c0ac.c -L${TUXDIR}/lib SIMPSERV++.o -brtl -qstaticinline -ltux -lbuft -lfml -lfml32 -lengine -lpthread -latmi++ -latmiutl++ -lfml++
make: 1254-004 The error code from the last command is 8.
My code doesn't use the method which references the tpinit ATMI function, only the library libatmi++.a does.
To work around this problem I have added the -f /opt/bea/tuxedo9.1/lib/tpinit.o on the buildserver command line.
CC=xlC_r CFLAGS="-I /opt/bea/tuxedo9.1/include -I ../include/ -DHAVE_CONFIG_H -L ../lib/ " buildserver -v -s TOUPPER -o ../app//SIMPSERV++ -f /opt/bea/tuxedo9.1/lib/tpinit.o -f SIMPSERV++.o -l '-latmi++ -latmiutl++ -lfml++'
Now here is my question: how is one supose to package ATMI calls into libraries ? Is there a compiler option which tells the compiler to ignore missing symbols ?
Any explanation or experience about the way Tuxedo packages it's libraries and how to use them are welcomed.
--友情转载