win2000+tuxedo8.1+oracle8.1.7
服务程序(test.pc)用Proc写的,内容如下:
#include <stdio.h>;
#include <atmi.h>;
#include <fml32.h>;
#include <userlog.h>;
EXEC SQL BEGIN DECLARE SECTION;
long al_empno=0;
char ac_ename[11]="";
EXEC SQL INCLUDE sqlca;
EXEC SQL VAR ac_ename IS STRING(11);
EXEC SQL END DECLARE SECTION;
TEST(TPSVCINFO *rqst)
{
/*接收客户端来的数据*/
al_empno =al_empno=atol(rqst->;data);
EXEC SQL select ename into:ac_ename from EMP where empno=:al_empno;
if(sqlca.sqlcode!=0)
{
tpreturn( TPFAIL, 0, rqst->;data, 0, 0 );
}
/*把取出的结果返回给客户端*/
strcpy(rqst->;data,ac_ename);
tpreturn( TPSUCCESS,0,rqst->;data,0,0 );
}
用Proc编译成test.c后,执行
buildserver -o test -f test.c -r Oracle_XA -s test
老是报错,错误如下:
..........
gdi32.lib
comdlg32.lib
winspool.lib
BS-bdc.obj : error LNK2001: unresolved external symbol _test
test.exe : fatal error LNK1120: 1 unresolved externals
CMDTUX_CAT:4180: ERROR: can't execute cl /MD -I"%TUXDIR%"\include -Fetest BS-bd
c.c test.c "%TUXDIR%"\lib\libtux.lib "%TUXDIR%"\lib\libbuft.lib d:\oracle\ora
81\rdbms\xa\oraxa8.lib d:\oracle\ora81\precomp\lib\msvc\orasql8.lib "%TUXDIR%"\l
ib\libfml.lib "%TUXDIR%"\lib\libfml32.lib "%TUXDIR%"\lib\libengine.lib wsock32.
lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib -l
ink -implib:BS-bdc.lib
请各位大虾给予帮助!!