Newer g++ Compiler Raises Libocci.So.10.1: Undefined Reference To Compile Error (Doc ID 1359468.1)

Last updated on JULY 17, 2017

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.5 and later   [Release: 10.2 and later ]
Information in this document applies to any platform.

Symptoms

Compiling custom code with Oracle OCCI calls / OCCI libraries using
g++ 4.1.2 and Oracle 10.2.0.5 errors with:


make -f GNUmakefile all 2>&1
g++ -I"/opt/ActivePerl-5.8/lib/CORE" -I"/opt/ActivePerl-5.8/lib/CORE" -I"/build/PRD8/include" -D"BDNDEBUG" -D"BDPERL_EXPORTS" -D"_GNU_SOURCE" -U"BDDEBUG" -O2 -o "obj/xsinit.o" -fpermissive -fPIC -w -m32 -c xsinit.cpp
g++ obj/version.o obj/stdafx.o obj/BDPerl.o obj/xsinit.o /opt/ActivePerl-5.8/site/lib/auto/DBI/DBI.so /opt/ActivePerl-5.8/site/lib/auto/DBD/Oracle/Oracle.so -shared -o lib/libbdperl.so -fpermissive -fPIC -w -m32 -L"/opt/ActivePerl-5.8/lib/CORE" -L"/build/PRD8/lib" -lbdinit -lperl -lbexos -lstltools -lcrypt -lperl
make -C perltest -f GNUmakefile all
make[1]: Entering directory `/build/PRD8/source/Utility/bdperl/perltest'
g++ obj/version.o obj/stdafx.o obj/perltest.o -o ../bin/perltest -fpermissive -fPIC -w -m32 -L"../lib" -L"/opt/ActivePerl-5.8/lib/CORE" -L"/build/PRD8/lib" -Xlinker -rpath-link -Xlinker "../lib:/opt/ActivePerl-5.8/lib/CORE:/build/PRD8/lib" -lbdinit -lbdperl -lbexos -lstltools -lperl -lnsl -lpthread -lrt -lm -ldl
/opt/app/oracle/product/RDBMS/10.2.0/lib32/libocci.so.10.1: undefined reference to `std::__default_alloc_template::deallocate(void*, unsigned int)'
/opt/app/oracle/product/RDBMS/10.2.0/lib32/libocci.so.10.1: undefined reference to `std::allocator::deallocate(char*, unsigned int)'
/opt/app/oracle/product/RDBMS/10.2.0/lib32/libocci.so.10.1: undefined reference to `std::allocator::allocate(unsigned int, void const*)'
/opt/app/oracle/product/RDBMS/10.2.0/lib32/libocci.so.10.1: undefined reference to `std::__default_alloc_template::allocate(unsigned int)'
collect2: ld returned 1 exit status

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms