当前位置: 技术问答>linux和unix
在HP-UX上编译的C程序,链接时出现下面的错误,有谁遇到过类似现象么?
来源: 互联网 发布时间:2015-10-11
本文导语: $ make cc ill_BankAccountMain.o ill_BankAccountInt.o ill_BankCommon.o bll_Bank Account.o bll_BankCustomer.o bll_BankStatement.o obj_Account.o obj_AccountType.o obj_Address.o obj_Balance.o obj_Customer.o obj_Interest.o obj_Locality.o obj_To wn.o obj_S...
$ make
cc ill_BankAccountMain.o ill_BankAccountInt.o ill_BankCommon.o bll_Bank
Account.o bll_BankCustomer.o bll_BankStatement.o obj_Account.o obj_AccountType.o
obj_Address.o obj_Balance.o obj_Customer.o obj_Interest.o obj_Locality.o obj_To
wn.o obj_State.o obj_Transaction.o dcl_Account.o dcl_AccountType.o dcl_Address.o
dcl_Balance.o dcl_Customer.o dcl_Interest.o dcl_Locality.o dcl_Town.o dcl_State
.o dcl_Transaction.o -o bankService
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (ill_BankAccountMain.
o) was detected. The linked output may not run on a PA 1.x system.
/usr/ccs/bin/ld: Unsatisfied symbols:
bankif_v1_0_mgr_epv (data)
sqli_slct (code)
sqli_stmt (code)
sqli_curs_locate (code)
sqli_trans_commit (code)
OpenTraceFile (code)
mon_RegisterRmi (code)
CloseTraceFile (code)
infx_xa_switch (data)
rpc_ss_allocate (code)
deccvasc (code)
sqli_curs_close (code)
TraceInit (code)
mon_RetrieveEnable (code)
NewCusomter (code)
MemAllocatepCustomerList (code)
sqlca (data)
sqli_curs_fetch (code)
mallloc (code)
sqli_curs_open (code)
dectoasc (code)
encina_StatusToString (code)
mon_InitServerInterface (code)
mon_BeginService (code)
Trace (code)
mon_InitServer (code)
mon_SetSchedulingPolicy (code)
sqli_curs_decl_stat (code)
_bankif_v1_0_s_ifspec (data)
*** Error exit code 1
Stop.
===============================
上面列出的未满足的字符有的是我在某些文件里定义的函数,其他应该都是某些Library里的函数与标识符。可是我在编译的时候都将这些库所在的路径加上了,不知道是漏加了某些路径还是其他原因。
cc ill_BankAccountMain.o ill_BankAccountInt.o ill_BankCommon.o bll_Bank
Account.o bll_BankCustomer.o bll_BankStatement.o obj_Account.o obj_AccountType.o
obj_Address.o obj_Balance.o obj_Customer.o obj_Interest.o obj_Locality.o obj_To
wn.o obj_State.o obj_Transaction.o dcl_Account.o dcl_AccountType.o dcl_Address.o
dcl_Balance.o dcl_Customer.o dcl_Interest.o dcl_Locality.o dcl_Town.o dcl_State
.o dcl_Transaction.o -o bankService
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (ill_BankAccountMain.
o) was detected. The linked output may not run on a PA 1.x system.
/usr/ccs/bin/ld: Unsatisfied symbols:
bankif_v1_0_mgr_epv (data)
sqli_slct (code)
sqli_stmt (code)
sqli_curs_locate (code)
sqli_trans_commit (code)
OpenTraceFile (code)
mon_RegisterRmi (code)
CloseTraceFile (code)
infx_xa_switch (data)
rpc_ss_allocate (code)
deccvasc (code)
sqli_curs_close (code)
TraceInit (code)
mon_RetrieveEnable (code)
NewCusomter (code)
MemAllocatepCustomerList (code)
sqlca (data)
sqli_curs_fetch (code)
mallloc (code)
sqli_curs_open (code)
dectoasc (code)
encina_StatusToString (code)
mon_InitServerInterface (code)
mon_BeginService (code)
Trace (code)
mon_InitServer (code)
mon_SetSchedulingPolicy (code)
sqli_curs_decl_stat (code)
_bankif_v1_0_s_ifspec (data)
*** Error exit code 1
Stop.
===============================
上面列出的未满足的字符有的是我在某些文件里定义的函数,其他应该都是某些Library里的函数与标识符。可是我在编译的时候都将这些库所在的路径加上了,不知道是漏加了某些路径还是其他原因。
|
链接问题,你链接的时候只指定了.o文件,并没有指定包含上述函数/变量的库文件,导致链接时不能找到相应的函数/变量
|
你内核元代码没有安装吧?
尝试 man 接口名称
例如 man sqli_curs_fetch
不行就用grep搜索
尝试 man 接口名称
例如 man sqli_curs_fetch
不行就用grep搜索
|
用到数据库API了吗?
数据库相关的LIB ??
数据库相关的LIB ??