Getting error while linking an OCCI program on AIX
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:开发者_如何学Python: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 ?
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.
Just for the record - OCCI/g++ combination does not work on AIX. I hope this would save someone's time
精彩评论