error compiling OCCI example - undefined reference
807575Jun 24 2010 — edited Jun 30 2010Hello.
I am having trouble linking a simple Oracle OCCI example using SunStudio 12 , Update 1 on RHEL 5.2 . This is the error.
~/demo]$ cat new.C
#include<occi.h>
using namespace oracle::occi;
int main(){
Environment *envr;
envr=Environment::createEnvironment(Environment::DEFAULT);
}
~/demo]$ CC -L/apps/oracle/product/10.2.0/lib -I/apps/oracle/product/10.2.0/rdbms/public -locci -lclntsh new.C
new.o: In function `main':
new.C:(.text+0x64): undefined reference to `oracle::occi::Environment*oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode,void*,void*(*)(void*,unsigned long),void*(*)(void*,void*,unsigned long),void(*)(void*,void*))'
The same example compiles and links with a warning with g++ . executable is created.
~/demo]$ g++34 -L/apps/oracle/product/10.2.0/lib -I/apps/oracle/product/10.2.0/rdbms/public -locci -lclntsh new.C
/usr/bin/ld: warning: libstdc++.so.5, needed by /apps/oracle/product/10.2.0/lib/libocci.so, may conflict with libstdc++.so.6
Any ideas what may be wrong here ?
Edited by: machambi on Jun 24, 2010 1:56 PM