tuxedo10g编译时报错,帮看看错在哪
[hwt@vmnew tuxint]$ cat setenv.sh
ORACLE_HOME=/opt/app/oracle/product/10.2.0/db_1;export ORACLE_HOME
TUXDIR=/tuxedo10/tuxedo10gR3;export TUXDIR
APPDIR=/home/hwt/tuxint;export APPDIR
export PATH=.:$TUXDIR/bin:$APPDIR:$PATH
TUXCONFIG=$APPDIR/tuxconfig;export TUXCONFIG
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$TUXDIR/lib;export LD_LIBRARY_PATH
FIELDTBL32=fmlfile;export FIELDTBL32
FLDTBLDIR32=$APPDIR;export FLDTBLDIR32
export TMTRACE=*:ulog:dye
[hwt@vmnew tuxint]$ make
buildserver -v -o svrInsert -f svrInsert.c -s INSERT -r Oracle_XA
cc -m32 -I$TUXDIR/include -o svrInsert BS-511b.c -L${TUXDIR}/lib svrInsert.c -ltux -lbuft -L${ORACLE_HOME}/lib -lclntsh -lfml -lfml32 -lengine -ldl -lpthread
/tmp/ccF2UT2G.o(.text+0x4a): In function `tpsvrinit':
: undefined reference to `ECPGget_sqlca'
/tmp/ccF2UT2G.o(.text+0x5b): In function `tpsvrinit':
: undefined reference to `ECPGget_sqlca'
/tmp/ccF2UT2G.o(.text+0x6a): In function `tpsvrinit':
: undefined reference to `ECPGget_sqlca'
/tmp/ccF2UT2G.o(.text+0x185): In function `INSERT':
: undefined reference to `ECPGget_sqlca'
/tmp/ccF2UT2G.o(.text+0x2f5): In function `INSERT':
: undefined reference to `ECPGget_sqlca'
/tmp/ccF2UT2G.o(.text+0x306): more undefined references to `ECPGget_sqlca' follow
collect2: ld returned 1 exit status
CMDTUX_CAT:1832: ERROR: can't execute cc -m32 -I$TUXDIR/include -o svrInsert BS-511b.c -L${TUXDIR}/lib svrInsert.c -ltux -lbuft -L${ORACLE_HOME}/lib -lclntsh -lfml -lfml32 -lengine -ldl -lpthread
make: *** [svrInsert] Error 1
[解决办法]
自己解决了。makefile没写对是直接原因。当然还有其他原因:
另外有个库clntsh.so注意不要和/usr/lib/libclntsh.so.10.1的重复了,要对/usr/lib里的那个库改名
本人环境是redflag DC server 5.0 + oracle10g +tuxedo10gR3