操作系统:AIX5.2
TUXEDO:8.1
编译器:visual age C++6.0
××方提供的头文件内容如下:
#ifndef API_HPP
#define API_HPP
void * MB_CONNECT(char *p_ret_code);
void MB_DISCONNECT(void);
void MB_SEND_CNAPS(void *pID, char *pPsWord,char *pInPutMsg,char *pRetMsg);
void MB_RECEIVE_CNAPS(void *, char *, char *, int &, char*);
void MB_CONFIRM_CNAPS(void *, char *, char *, int, char*);
//optflag: 0:read 1:write
int OPEN_FILE(char *filename, int optflag);
int WRITE_BUFF(char *pWriteBuff);
int READ_BUFF(char *pReadBuff);
void CLOSE_FILE();
#endif
我们的makefile的内容:
cc=xlC -q32
CC=xlC -q32
#CPP=xlC
SYBDIR=/sybase
BINDIR=$(HOME)/bin
IFLAG=-I$(TUXDIR)/include -I$(HOME)/include -I/app/oap/include -I$(SYBDIR)/OCS-12_5/include
#LFLAG=-L$(HOME)/lib -lmbfeapi -lmac -lbcf -lm -L$(SYBDIR)/lib -lsybdb #不带密押
LFLAG=/app/oap/lib/libmbfeapi.so /sybase/OCS-12_5/lib/libsybdb.a /app/oap/lib/LibCNAPSmac.a -L$(HOME)/lib -lbcf -lm -lnsl #带密押
LFLAGq=-L$(HOME)/lib -lbcf -lm
CFLAGS= -qlanglvl=extc99 -qcpluscmt -bdynamic -DNOWHAT=1 -DDEBUG
all:oap_server oap_client py clean
.SUFFIXES: .c .o
.c.o:
$(CC) $(CFLAGS) $(IFLAG) -c $< -g
# $(CC) $(IFLAG) -c $*.c
clean:
rm *.o
oap_server:oap_server.o svc_mtc.o app_log.o comm_fun.o tools.o readini.o \
pack.o unpack.o packfun.o shm.o lic.o
buildserver -o $@ -f " $? $(LFLAG)" -s ProcKernel
@mv -f $@ $(BINDIR)
oap_client:rcv_mbfe.o proc_mbfe.o app_log.o comm_fun.o tools.o readini.o \
packfun.o pack.o unpack.o shm.o lic.o
buildclient -o $@ -f "$? $(LFLAG)"
@mv -f $@ $(BINDIR)
py:py.o proc_mbfe.o app_log.o comm_fun.o tools.o readini.o \
packfun.o pack.o unpack.o shm.o lic.o
buildclient -o $@ -f "$? $(LFLAG)"
@mv -f $@ $(BINDIR)
Make时的出错信息
oap@/app/oap/srchv>make
xlC -q32 -qlanglvl=extc99 -qcpluscmt -bdynamic -DNOWHAT=1 -DDEBUG -I/app/tuxedo8.1/include -I/app/oap/include -I/app/oap/include -I/sybase/OCS-12_5/include -c oap_server.c -g
xlC -q32 -qlanglvl=extc99 -qcpluscmt -bdynamic -DNOWHAT=1 -DDEBUG -I/app/tuxedo8.1/include -I/app/oap/include -I/app/oap/include -I/sybase/OCS-12_5/include -c svc_mtc.c -g
xlC -q32 -qlanglvl=extc99 -qcpluscmt -bdynamic -DNOWHAT=1 -DDEBUG -I/app/tuxedo8.1/include -I/app/oap/include -I/app/oap/include -I/sybase/OCS-12_5/include -c app_log.c -g
xlC -q32 -qlanglvl=extc99 -qcpluscmt -bdynamic -DNOWHAT=1 -DDEBUG -I/app/tuxedo8.1/include -I/app/oap/include -I/app/oap/include -I/sybase/OCS-12_5/include -c comm_fun.c -g
xlC -q32 -qlanglvl=extc99 -qcpluscmt -bdynamic -DNOWHAT=1 -DDEBUG -I/app/tuxedo8.1/include -I/app/oap/include -I/app/oap/include -I/sybase/OCS-12_5/include -c tools.c -g
xlC -q32 -qlanglvl=extc99 -qcpluscmt -bdynamic -DNOWHAT=1 -DDEBUG -I/app/tuxedo8.1/include -I/app/oap/include -I/app/oap/include -I/sybase/OCS-12_5/include -c readini.c -g
xlC -q32 -qlanglvl=extc99 -qcpluscmt -bdynamic -DNOWHAT=1 -DDEBUG -I/app/tuxedo8.1/include -I/app/oap/include -I/app/oap/include -I/sybase/OCS-12_5/include -c pack.c -g
"pack.c", line 214.17: 1506-068 (W) Operation between types "int" and "char*" is not allowed.
"pack.c", line 403.17: 1506-068 (W) Operation between types "int" and "char*" is not allowed.
xlC -q32 -qlanglvl=extc99 -qcpluscmt -bdynamic -DNOWHAT=1 -DDEBUG -I/app/tuxedo8.1/include -I/app/oap/include -I/app/oap/include -I/sybase/OCS-12_5/include -c unpack.c -g
"unpack.c", line 321.17: 1506-068 (W) Operation between types "int" and "char*" is not allowed.
xlC -q32 -qlanglvl=extc99 -qcpluscmt -bdynamic -DNOWHAT=1 -DDEBUG -I/app/tuxedo8.1/include -I/app/oap/include -I/app/oap/include -I/sybase/OCS-12_5/include -c packfun.c -g
xlC -q32 -qlanglvl=extc99 -qcpluscmt -bdynamic -DNOWHAT=1 -DDEBUG -I/app/tuxedo8.1/include -I/app/oap/include -I/app/oap/include -I/sybase/OCS-12_5/include -c shm.c -g
xlC -q32 -qlanglvl=extc99 -qcpluscmt -bdynamic -DNOWHAT=1 -DDEBUG -I/app/tuxedo8.1/include -I/app/oap/include -I/app/oap/include -I/sybase/OCS-12_5/include -c lic.c -g
buildserver -o oap_server -f " oap_server.o svc_mtc.o app_log.o comm_fun.o tools.o readini.o pack.o unpack.o packfun.o shm.o lic.o /app/oap/lib/libmbfeapi.so /sybase/OCS-12_5/lib/libsybdb.a /app/oap/lib/LibCNAPSmac.a -L/app/oap/lib -lbcf -lm -lnsl " -s ProcKernel
ld: 0711-224 WARNING: Duplicate symbol: tpsvrinit
ld: 0711-224 WARNING: Duplicate symbol: .tpsvrinit
ld: 0711-224 WARNING: Duplicate symbol: .tpsvrdone
ld: 0711-224 WARNING: Duplicate symbol: .userlog
ld: 0711-224 WARNING: Duplicate symbol: userlog
ld: 0711-224 WARNING: Duplicate symbol: tpsvrdone
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-317 ERROR: Undefined symbol: .MB_SEND_CNAPS
ld: 0711-317 ERROR: Undefined symbol: .MB_CONNECT
CMDTUX_CAT:1832: ERROR: can't execute cc -brtl -qstaticinline -I$TUXDIR/include -o oap_server BS-8b8c.c -L${TUXDIR}/lib oap_server.o svc_mtc.o app_log.o comm_fun.o tools.o readini.o pack.o unpack.o packfun.o shm.o lic.o /app/oap/lib/libmbfeapi.so /sybase/OCS-12_5/lib/libsybdb.a /app/oap/lib/LibCNAPSmac.a -L/app/oap/lib -lbcf -lm -lnsl -brtl -qstaticinline -ltux -lbuft -lfml -lfml32 -lengine -lpthread
make: The error code from the last command is 8.
目前我的想法是:因为人行的API函数是C++编译的,而tuxedo封装的是小cc
这里的出错信息可以看出CMDTUX_CAT:1832: ERROR: can't execute cc -brtl -qstaticinline
所以无法调用xlC的编译器
所以无法认到由C++编译出的lib库
请问我的想法对吗?
如果对有什么办法
让tuxedo能调到xlC呢?
关于__cxa_throw ()的问题
c++中依次读取文件中的数据并且进行运算
release版本下生成的exe,执行的时候却调用debug的运行库
c语言 _findnext 函数无法打开文件
c++ primer 5th 习题10.1 求解
首先你应该确认是否可以在命令行中执行cc命令,看错误提示好像是没找到可执行程序;
按说默认安装的xlC是直接可以运行cc的!
其次,如果不是必须的话,没必要使用buildserver/buildclient命令来编译程序;
修改你的compiling rules,直接使用xlC加tuxedo参数来编译你的程序;
参数大致上就是你报错信息中那一串,不同平台稍有差异!
以前用TUXEDO的时候也是最讨厌其编译了,好像有多大个秘密藏着一样,经常在后台偷偷搞些临时文件一起编译,非常不直观方便。
不行就先编译一个独立的库,定义出c的接口,然后在tuxedo的库里面使用独立的库就可以了。
太久没搞这个了,帮不上忙。
--转自