Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Complie with Oracle OCCI library on Linux
I have installed Oracle9i 9.2.0 on Redhat 7.3, and seem to have
problems
when linking with the libocci.so shared library - see example below.
Has anyone managed to compile and link a C++ code using the Oracle OCCI C++ Call Interface on linux? I am stuck and any sort of help on the subject, including other alternatives than OCCI, would be most welcomed.
Many thanks.
Youri.
-- For example g++ -L/data/oracle/product/9.2.0/lib/ -o test test.o -locci -lgcc -lclntsh -ldl -lm -lpthread -lnsl would give something like test.o(.text+0x38): undefined reference to `oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode, void*, void* (*)(void*, unsigned), void* (*)(void*, void*, unsigned), void (*)(void*, void*))' where test.cpp could be something likeReceived on Sat Oct 19 2002 - 10:50:55 CDT
#include <iostream>
#include <occi.h>
using namespace oracle::occi; using namespace std; int main (void) { Environment *env = Environment::createEnvironment(); }