日期:2014-05-16  浏览次数:20795 次

make时,link不到oracle函数?
啥都不说:直接上错误信息:

Assembly code

未定义                  文件中的
 符号                       在文件中
ocof                                /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
ocom                                /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
ofen                                /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
oexn                                /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
orol                                /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
oexec                               /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
oopen                               /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
orlon                               /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
obndra                              /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
obndrv                              /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
oclose                              /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
odefin                              /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
odescr                              /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
oerhms                              /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
oexfet                              /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
ologof                              /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
oparse                              /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)
opinit                              /export/home/aimgpkg/aimg/lib/dbagent/mycplib/lib/mycplib.a(cpOracleInterface.o)



我设了oracle的环境变量的:

Assembly code

ORACLE_HOME=/nfs231/oracle/product/8.1.7
export ORACLE_HOME

LD_LIBRARY_PATH=$ORACLE_HOME/lib:$HOME/autotools/lib:/usr/local/lib:/export/home/aimgpkg/mysql-5.1.49/lib/mysql:
export LD_LIBRARY_PATH



求高人解答!!

------解决方案--------------------
找不到库,在系统文件/etc/ld.so.conf中加入你的库路径,然后再以root身份执行一下ldconfig命令。
------解决方案--------------------
那个环境变量控制运行时的搜索路径吧

你编译的时候也没有指定要连接的oracle库文件?
比如-L$ORACLE_HOME/lib -lclntsh
------解决方案--------------------
找是去找了,但是你没告诉程序去找哪个LIB..所以参考3楼的方法吧。