斑竹,我下载的使用开发版CT602.10.02.041NEO5在redflag asiauix 3上编译test,pc,
连接时找不到sqlca_load等API函数。用nm *.a|grep sqlca_load在/opt/dmdbms/bin和/opt/dmdbms/bin/proc目录也查不到这些API函数存在。
$ dmproc -P test.pc -CF 1 -CH 1 -SR c -MD DB2
*********** test **********
lineno comment
3 using include
[注] 只生成了test.c 没有程序员手册中说的test_sql.h、test_sql.c、test_stmt.c 和test_hdl_sql.ic等。是有错吗?
$ gcc -o test test.c -I/opt/dmdbms/bin/proc -L/opt/dmdbms/bin -ldmapi
/tmp/cc8WU8sz.o: In function `main':
test.c

.text+0x79): undefined reference to `dmpc_set_sqlca'
test.c

.text+0x85): undefined reference to `dmpc_set_mode'
test.c

.text+0xb4): undefined reference to `dmpc_connect'
test.c:(.text+0xdc): undefined reference to `dmpc_set_sqlca'
test.c:(.text+0xe7): undefined reference to `dm_sql_realloc_stmt'
test.c:(.text+0x122): undefined reference to `sqlca_load'
test.c:(.text+0x20e): undefined reference to `sqlca_load'
test.c:(.text+0x254): undefined reference to `dmpc_set_sqlca'
test.c:(.text+0x259): undefined reference to `dmpc_disconnect'
collect2: ld 返回 1
这些API函数不在libdmapi.a中啊。
请指教!