PDA

View Full Version : OCCI implementation in g++ in linux for interction with oracle..


arunks
08-03-2008, 12:09 PM
Guys plz help me

I m getting following errors when i compile my file new1.cpp through g++ compiler

new1.o: In function `main':
new1.cpp:(.text+0xac): undefined reference to `oracle::occi::Environment::create
Environment(oracle::occi::Environment::Mode, void*, void* (*)(void*, unsigned in
t), void* (*)(void*, void*, unsigned int), void (*)(void*, void*))'
collect2: ld returned 1 exit status

plz tell me what to do...

QwertyManiac
08-03-2008, 04:42 PM
You need to link your compiler to the OCCI libraries I guess.

Try:g++ -L/$ORACLE_HOME/lib/ -L/$ORACLE_HOME/rdbms/lib/ -o program program.o -locci -lclntsh

Src. (http://forums.oracle.com/forums/thread.jspa?messageID=1992377)