Getting error while linking an OCCI program on AIX

▼魔方 西西 提交于 2019-12-25 18:09:20

问题


I have written one sample program for connecting Oracle in C++ using OCCI..

It is giving me a runtime error .

ld: 0711-317 ERROR: Undefined symbol: .oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode,void*,void*(*)(void*,unsigned long),void*(*)(void*,void*,unsigned long),void(*)(void*,void*))
ld: 0711-317 ERROR: Undefined symbol: .oracle::occi::Environment::terminateEnvironment(oracle::occi::Environment*)

I have given the following command to execute it

g++ -o occi amrtest.cpp -Wall -I/oradata/oracle/product/10.2.0/db_1/rdbms/public -L/oradata/oracle/product/10.2.0/db_1/lib -lclntsh  -lnnz10 -locci -lclntsh  -lnnz10 -locci10

Can u help me in getting this error resolved ?


回答1:


I am not an AIX nor Oracle expert, but seems that your LD_LIBRARY_PATH (or equivalent in AIX) should include $ORACLE_HOME/lib. Check this forum entries:

http://forums.oracle.com/forums/thread.jspa?messageID=2172885
http://forums.oracle.com/forums/thread.jspa?threadID=579418&tstart=0
http://www.dbforums.com/oracle/1007236-occi-aix-oracle-9-a.html

HTH.




回答2:


Just for the record - OCCI/g++ combination does not work on AIX. I hope this would save someone's time



来源:https://stackoverflow.com/questions/1659614/getting-error-while-linking-an-occi-program-on-aix

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!