Skip to Main Content

OCCI demo linking errors

User_SOAD0Nov 1 2021

I'm on RHEL 8 and have installed the Oracle Client software 19c, as well as the Examples. I've got the $ORACLE_HOME/precomp/demo/proc examples compiling correctly. I copied the $ORACLE_HOME/rdbms/demo code to a working directory and when I try to compile it I get errors:
$ make -f demo_rdbms.mk occidemos
...
make -f /app/oracle/rdbms/demo/demo_rdbms.mk buildocci EXE=occicoll OBJS=occicoll.o
make[1]: Entering directory '/home/oracle/rdbms/demo'
/usr/bin/g++ -c -I/u01/app/oracle/product/19.0.0/client_1/rdbms/demo -I/u01/app/oracle/product/19.0.0/client_1/rdbms/public -I/u01/app/oracle/product/19.0.0/client_1/plsql/public -I/u01/app/oracle/product/19.0.0/client_1/network/public -m64 occicoll.cpp -DLINUX -DORAX86_64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS -DLONG_IS_64 -DSS_64BIT_SERVER -DCOMP_DIR="" -DLDAP_CM
/usr/bin/g++ -L/u01/app/oracle/product/19.0.0/client_1/lib/ -L/u01/app/oracle/product/19.0.0/client_1/rdbms/lib/ -o occicoll occicoll.o -locci -lclntsh -lclntshcore `cat /u01/app/oracle/product/19.0.0/client_1/lib/sysliblist` -ldl -lm -lpthread -m64
/usr/bin/ld: warning: libnsl.so.1, needed by /u01/app/oracle/product/19.0.0/client_1/lib//libclntsh.so, may conflict with libnsl.so.2
occicoll.o: In function `main':
occicoll.cpp:(.text+0x488): undefined reference to `oracle::occi::SQLException::getMessage[abi:cxx11]() const'

$ gcc -v
gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC)

Can anyone offer suggestions on how to get the sample code to compile?

Comments
Post Details
Added on Nov 1 2021
0 comments
160 views