Link Error Linux AS3: undefined reference to `oracle::occi::Environment

I got this error when i try to run sample database access using OCCI libraries.
test.cpp:21: undefined reference to `oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode, void*, void* (*)(void*, unsigned int), void* (*)(void*, void*, unsigned int), void (*)(void*, void*))'
Following link contains same problem but there is no answer.
#include <iostream>
#include <occi.h>
using oracle::occi::Connection;
using oracle::occi::Environment;
using oracle::occi::Statement;
using oracle::occi::ResultSet;
using namespace std;
int main() {
Environment *environment;
Connection *con;
Statement* stmt;
ResultSet* res;
try {
//std::cout << "dasfasfafa";
environment = Environment::createEnvironment(oracle::occi::Environment::DEFAULT);
con = environment->createConnection("aaa", "aaa", "Caaa");
stmt = con->createStatement("select * from emp");
res = stmt->executeQuery();
while (res->next())
std::cout << res->getInt(1) << " " << res->getString(2) << std::endl;
stmt->closeResultSet(res);
con->terminateStatement(stmt);
environment->terminateConnection(con);
} catch (oracle::occi::SQLException &e) {
std::cout << e.what();
return 0;
}

The demos have this:
#include <iostream>
#include <occi.h>
using namespace oracle::occi;
using namespace std;
...

Similar Messages

  • Occi 11.1 Error on compile: undefined reference to `oracle::occi::Enviro...

    I'm trying to compile an hello world example on my computer. I've read the documentation for requirements occi on the site
    http://docs.oracle.com/cd/E11882_01/install.112/e24322/pre_install.htm#CHDHFGBJ
    It says that the g++ compiler 3.4.6 or later is supported. I have:
    Ubuntu 12.04
    gcc 4.6.3
    oracle instant client 11.2
    and the error is below, does anyone have a suggestion?
    g++ main.cpp -c -I/home/tim/skrivbord/bin/oracle/instantclient_11_2/include/ -D_REENTRANT -g -Wall
    g++ -o pippo -L/home/tim/skrivbord/bin/oracle/instantclient_11_2/ -locci -lclntsh -lociei -lnnz11 main.o
    main.o: In function `main':
    /home/tim/skrivbord/dev/cpp/main.cpp:21: undefined reference to `oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode, void*, void* (*)(void*, unsigned int), void* (*)(void*, void*, unsigned int), void (*)(void*, void*))'
    collect2: ld returned 1 exit status
    make: *** [buildocci] Error 1
    main.cpp:
    #include <iostream>
    #include <occi.h>
    using namespace std;
    using namespace oracle::occi;
    int main(){
    Environment *environment;
    environment = Environment::createEnvironment();
    return 0;
    }

    For correctness I will close this question. I had made some errors with my environment variables LD_LIBRARY_PATH and specially I did not have libaio installed which is well documented that it has to be.

  • Linker error in c++ -- undefined reference to `vtable for String'

    While linking cpp file : wrapGetRndAmt.cpp which is below:
    wrapGetRndAmt.cpp .....
    #include <iostream.h>
    #include "archinfo.h"
    #include "syscodes.h"
    #include "currency_directory.h"
    extern MESSAGE_TYPE SetMemMarker();
    extern MESSAGE_TYPE FreeMemBlock();
    extern "C" int dm_login();
    extern "C" int dm_commit();
    extern "C" int dm_rollback();
    //extern MESSAGE_ARRAY *messageArray;
    struct tpsvcInfo *funcAry;
    /* Wrapper function to apply rounding rule (to the amount)*/
    int wrapGetRndAmt(char * ou_id, char * currency , double& amount)
    SetMemMarker();
    int rndng_rule=0;
    double rndng_val=0.0;
    double l_rtrnCode=0.0;
    double l_tmp=0.0;
    String * s_curr = new String(currency); ///This is the call of the String
    The error coming is:
    /home/gcrmdev/3.5/B/lib/h/xlstring.h:54: undefined reference to `vtable for String'
    /home/gcrmdev/3.5/B/lib/h/xlstring.h:54: undefined reference to `vtable for String'
    Header file is below:
    xlstring.h
    #ifdef SOLARIS
    11 #include "mystring.h"
    12 #else
    13 #include <string.h>
    14 #endif
    15 #include "xdr.h"
    16 #include <cppdefs.h>
    17 /* added by prabhat */
    18 #include "bglb.h"
    19 /* added by prabhat ends */
    20
    21 /*
    22 *-----------------------------------------------------------------------------
    23 * CLASS : String
    24 * PURPOSE : For performing all string operation
    25 * BASE CLASS : Object
    26 * PARENT CLASS : Object
    27 * COMMENT :
    28 * HISTORY :
    29 *-----------------------------------------------------------------------------
    30 */
    31 class String : public CppObj {
    32 int len;
    33 char *s;
    34
    35 public:
    36
    37 int operator == (const String &s1){ return strcmp(s,s1.s) ? 0 : 1;}
    38 int operator==(const Object &o)
    39 {
    40 return ( strcmp ( Type() , o.Type() ) == 0 )
    41 ? operator ==( ( const String &)o)
    42 : 0 ;
    43 }
    44 int operator != (const String &s1){ return strcmp(s,s1.s) ? 1 : 0;}
    45 int operator < (const String &s1){ return ( strcmp(s,s1.s) < 0 ) ? 1 : 0;}
    46 int operator <= (const String &s1){ return ( strcmp(s,s1.s) <= 0 ) ? 1 : 0;}
    47 int operator > (const String &s1){ return ( strcmp(s,s1.s) > 0 ) ? 1 : 0;}
    48 int operator >= (const String &s1){ return ( strcmp(s,s1.s) >= 0 ) ? 1 : 0;}
    49 operator String *() const { return new String( s ); }
    50 /* INT4 Length( INT4 & l ) const { l = len; return len; } */
    51 MESSAGE_TYPE Length( INT4 & l ) const { l = len; return XL_SUCCESS; }
    52 INT4 Length() const { return len; }
    53 /* DelhiPuneSync Changes : to take care of memAlloc fail */
    54 String( char const *s1) {
    55 if ( s1 == NULL) return;
    56 s = (char *)memAlloc((len = strlen(s1))+1);
    57 if (s != NULL)
    58 strcpy(s,s1);
    59 }
    Can someone help why this error is coming??
    Thanks is advance.
    Arabinda

    Hi,
    This is often the result of failing to include the orasqlX.lib file as input to the linker.
    I have a walkthrough of integrating Pro*C with Visual Studio here:
    http://oradim.blogspot.com/2009/05/oracle-proc-on-windows-with-express.html
    Maybe that will be of some help.
    How are you linking?
    Regards,
    Mark

  • Link error:libocci.so undefined reference to `cerr' on redhat with gcc 3.4.

    when I made a occi application , the compiler gave me following errors:
    g++ -locci -lclntsh -lclntst9 -locci9 -ldl -lc -lm -lstdc++ -lgcc_s occidemo.o -I/opt/oracle/product/9.2.0/rdbms/demo \
    -I/opt/oracle/product/9.2.0/rdbms/public \
    -L/opt/oracle/product/9.2.0/lib/ -L/usr/lib -o occidemo
    /opt/oracle/product/9.2.0/lib//libocci.so: undefined reference to `cerr'
    /opt/oracle/product/9.2.0/lib//libocci.so: undefined reference to `endl(ostream &)'
    /opt/oracle/product/9.2.0/lib//libocci.so: undefined reference to `__out_of_range(char const *)'
    /opt/oracle/product/9.2.0/lib//libocci.so: undefined reference to `__ctype_toupper'
    /opt/oracle/product/9.2.0/lib//libocci.so: undefined reference to `ostream::operator<<(char const *)'
    /opt/oracle/product/9.2.0/lib//libocci.so: undefined reference to `__length_error(char const *)'
    I guess that it could not find libstdc++.so ,so I run the command :
    # ldconfig -p | grep std
    libstdc++.so.6 (libc6) => /usr/lib/libstdc++.so.6
    libstdc++.so.5 (libc6) => /usr/lib/libstdc++.so.5
    libstdc++.so (libc6) => /usr/lib/libstdc++.so
    libstdc++-libc6.2-2.so.3 (libc6) => /usr/lib/libstdc++-libc6.2-2.so.3
    libstdc++-libc6.1-1.so.2 (libc6) => /usr/lib/libstdc++-libc6.1-1.so.2
    my environment is : Linux version 2.6.9-34.ELsmp , Red Hat Enterprise Linux AS release 4 (Nahant Update 3) (gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)) #1 SMP Fri Feb 24 16:54:53 EST 2006
    I was so confused , please help me

    To use OCCI with g++ 3.4.5 (32-bit), you need to install Oracle Client 10.2.0.1.0 or 10.2.0.2.0 and download new OCCI libraries from :-
    http://otn.oracle.com/com/tech/oci/occi

  • Exceptions in oracle::occi::Environment's class terminate methods

    Could terminateEnvironment or terminateConnection oracle::occi::Environment's throw an Exception?
    I want to call this methods from a destructor and I must to know it (the doc say nothing)
    Thanks in advance!
    Best regards

    Hi,
    No, I just installed the application on one machine, so i can't reproduce it on another machine.What is the OS?
    Can you please explain what you mean by:
    see if the solution in (Note: 1076817.1 - Cannot Launch FDHM IN DBI, It Shows Blank Screen) helps.This is a My Oracle Support document -- https://support.oracle.com
    Thanks,
    Hussein

  • Ora 12c install error on openSuse: undefined reference to symbol '__tls_get_addr@@GLIBC_2.3'

    Hi everyone,
    I know that Oracle does not support OpenSuSE, but all previous database versions worked.
    With Oracle 12c, the installation fails. I get the error below.
    Probably someone has a helpful idea?
    Yours, user8632123.
    INFO: make -f /home/oracle/base/rdbms/12.101/precomp/lib/ins_precomp.mk relink EXENAME=proc
    INFO: make[1]: Entering directory `/home/oracle/base/rdbms/12.101/precomp/lib'
    INFO: Linking /home/oracle/base/rdbms/12.101/precomp/lib/proc
    INFO: /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: /home/oracle/base/rdbms/12.101/lib//libnls12.a(lxhlang.o): undefined reference to symbol '__tls_get_addr@@GLIBC_2.3'
    /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: note: '__tls_get_addr@@GLIBC_2.3' is defined in DSO /lib64/ld-linux-x86-64.so.2 so try adding it to the linker command line
    /lib64/ld-linux-x86-64.so.2: could not read symbols: Invalid operation
    INFO: collect2: error: ld returned 1 exit status
    INFO: /bin/chmod: cannot access ‘/home/oracle/base/rdbms/12.101/precomp/lib/proc’
    INFO: : No such file or directory
    INFO: make[1]: Leaving directory `/home/oracle/base/rdbms/12.101/precomp/lib'
    INFO: make[1]: *** [/home/oracle/base/rdbms/12.101/precomp/lib/proc] Error 1
    INFO: make: *** [proc] Error 2

    I'm using opensuse 12.3 and I has this error too.
    My solution is
    1) backup {ORACLE_HOME}/lib/stubs and then delete it.
    2) change RMAN_LINKLINE in the file  {ORACLE_HOME}/rdbms/lib/env_rdbms.mk
         to
    RMAN_LINKLINE=$(LINK) $(OPT) $(S0MAIN) $(SSKRMED) $(SKRMPT) \
            $(LLIBDBTOOLS) $(LLIBCLIENT) $(LLIBSQL) $(LLIBPLSQL) \
            $(LLIBSNLSRTL) $(LLIBUNLSRTL) $(LLIBNLSRTL) \
            $(LLIBSLAX) $(LLIBPLSQL) $(LIBPLCN) $(LINKTTLIBS) -lons
    3) relink all.

  • Build cvm error: /UNIXProcess_md.c undefined reference to `__libc_wait'

    Hello,
    I used the follow command to build cvm in cdc:
    make CVM_DEBUG=true CVM_JAVABIN=$JAVA_HOME/bin
    CVM_GNU_TOOLS_PATH=/usr/bin
    The gcc's version is 2.95.3. J2SE version is J2SE 1.4. OS is Fedora 3. I got the following error message:
    Linking ../../build/linux-i686/bin/cvm
    ../../build/linux-i686/obj/UNIXProcess_md.o(.text+0x3ab): In function `sigchld_handler':
    /root/cdcfoundation/build/linux-i686/../../src/linux/native/java/lang/UNIXProcess_md.c:213: undefined reference to `__libc_wait'
    collect2: ld returned 1 exit status
    make: *** [../../build/linux-i686/bin/cvm] Error 1
    I think this problem relates to java and glibc library in redhat. Can someone give some propositions?
    Thanks a lot for help in advance!!
    zhiyong

    See here (original topic was double posted)
    http://forum.java.sun.com/thread.jspa?messageID=3528322&#3528322

  • Compiling errors libGL.so: undefined reference to `_nv001833gl

    i encountered these errors when compiling alienarena and projectM:
    /usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../lib/libGL.so: undefined reference to `_nv001833gl'
    /usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../lib/libGL.so: undefined reference to `_nv001835gl'
    /usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../lib/libGL.so: undefined reference to `_nv001834gl'
    /usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../lib/libGL.so: undefined reference to `_nv001836gl'
    im using arch64, nvidia drivers nvidia-180.29-3..
    can someone explain me what is going wrong here ?

    cant compile amarok2 from aur, same error. so i tried the beta driver 185.13, but after the kdm symbols faded in it doesnt switch to the desktop. im back to 180.29.
    this is very annoying, as i simply have not the knowledge to fix stuff like that

  • HELP:link error under redhat linux 9.0(oracle 9.2.0)

    i link the demo shipped with oracle 9.2.0,but failed.
    error message shows:
    /usr/bin/g++ -L/home/oracle/product/9.2.0/lib/ -L/home/oracle/product/9.2.0/rdbm
    s/lib/ -o occiproc occiproc.o -locci -lclntsh `cat /home/oracle/product/9.2.0/
    lib/sysliblist` -ldl -lm
    occiproc.o(.gcc_except_table+0x70): undefined reference to `typeinfo for oracle:
    :occi::SQLException'
    occiproc.o(.gcc_except_table+0x88): undefined reference to `typeinfo for oracle:
    :occi::SQLException'
    occiproc.o(.gnu.linkonce.t._ZN8occiprocC1ESsSsSs+0x14): In function `occiproc::o
    cciproc[in-charge](std::basic_string<char, std::char_traits<char>, std::allocato
    r<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char>
    , std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':: undefined reference to `oracle::occi::Environment::createEnvironment(oracle::o
    cci::Environment::Mode, void*, void* (*)(void*, unsigned), void* (*)(void*, void
    *, unsigned), void (*)(void*, void*))'
    occiproc.o(.gnu.linkonce.t._ZN8occiprocD1Ev+0x2e): In function `occiproc::~occip
    roc [in-charge]()':
    : undefined reference to `oracle::occi::Environment::terminateEnvironment(oracle
    ::occi::Environment*)'
    collect2: ld returned 1 exit status

    OCCI 9.2 is not supported with gcc3.2. Please search this forum for more details.

  • Error compiling OCCI example -  undefined reference

    Hello.
    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

    Well, without being able to recreate it myself, I think I'm stumped. I figured it was a linking error based on the error message but the format of the error message isn't familiar to me. What platform is this being done on?
    Other things I would do to try to track down the issue (I'm sure you've probably done most of these, but just to be thorough):
    Verify that the ${ORACLE_HOME}/lib/libocci.a library exists and you have read access to it. It will often be a symbolic link to a versioned library such as ${ORACLE_HOME}/lib/libocci10.a. In our Oracle installation we have a ${ORACLE_HOME}/lib and an ${ORACLE_HOME}/lib32, and in our case the libocci.a file is actually installed in the lib32 directory. However, I doubt the library is missing otherwise you would get a library not found error instead, but I'm not sure what error you would get if you didn't have read permissions.
    Try linking it directly instead of going through CC.
    Use a command like:
    ~/demo]$ nm -C ${ORACLE_HOME}/lib/libocci.a |grep "::createEnvironment(oracle" to make sure the function can be found within the occi library and in the format the linker is looking for.
    Look over the man pages on your linker looking for clarification on how it locates libraries, if it looks in additional locations or if there are any environment variables that would effect the paths you provided on the command line.
    -Christian

  • Again with the Environment::createEnvironment undefined reference

    Gentlemen,
    I've read through your posts on how to fix this item. However, none of your suggestions have worked.
    So using the simple make of the rdbms demo program I ran this:
    sudo make -f demo_rdbms.mk buildocci EXE=exename OBJS=occidml.o
    and got this:
    /usr/bin/g++ -c -I/u01/app/oracle/product/9.2.0.5/rdbms/demo -I/u01/app/oracle/product/9.2.0.5/rdbms/public -I/u01/app/oracle/product/9.2.0.5/plsql/public -I/u01/app/oracle/product/9.2.0.5/network/public occidml.cpp
    /usr/bin/g++ -L/u01/app/oracle/product/9.2.0.5/lib/ -L/u01/app/oracle/product/9.2.0.5/rdbms/lib/ -o exename occidml.o -locci -lclntsh `cat /u01/app/oracle/product/9.2.0.5/lib/sysliblist` -ldl -lm
    occidml.o(.gcc_except_table+0x100): undefined reference to `typeinfo for oracle::occi::SQLException'
    occidml.o(.gcc_except_table+0x150): undefined reference to `typeinfo for oracle::occi::SQLException'
    occidml.o(.gcc_except_table+0x1a8): undefined reference to `typeinfo for oracle::occi::SQLException'
    occidml.o(.gcc_except_table+0x200): undefined reference to `typeinfo for oracle::occi::SQLException'
    occidml.o(.gcc_except_table+0x25c): undefined reference to `typeinfo for oracle::occi::SQLException'
    occidml.o(.gnu.linkonce.t._ZN7occidmlC1ESsSsSs+0x20): In function `occidml::occidml(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode, void*, void* (*)(void*, unsigned int), void* (*)(void*, void*, unsigned int), void (*)(void*, void*))'
    occidml.o(.gnu.linkonce.t._ZN7occidmlD1Ev+0x2e): In function `occidml::~occidml()':
    : undefined reference to `oracle::occi::Environment::terminateEnvironment(oracle::occi::Environment*)'
    occidml.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x1cf): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&)'
    occidml.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x20f): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::getErrorCode() const'
    occidml.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x252): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::getMessage() const'
    occidml.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x2ae): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    occidml.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x2c2): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    occidml.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x18f): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&)'
    occidml.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x1cf): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::getErrorCode() const'
    occidml.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x212): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::getMessage() const'
    occidml.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x26e): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    occidml.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x282): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    occidml.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x1cf): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&)'
    occidml.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x20f): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::getErrorCode() const'
    occidml.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x252): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::getMessage() const'
    occidml.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x2ae): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    occidml.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x2c2): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    occidml.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x1cf): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&)'
    occidml.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x20f): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::getErrorCode() const'
    occidml.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x252): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::getMessage() const'
    occidml.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x2ae): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    occidml.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x2c2): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    occidml.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x234): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&)'
    occidml.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x274): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::getErrorCode() const'
    occidml.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x2b7): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::getMessage() const'
    occidml.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x313): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    occidml.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x327): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `cerr'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__pure_virtual'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `exception type_info function'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__cp_push_exception'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `endl(ostream &)'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__uncatch_exception'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__out_of_range(char const *)'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__rtti_user'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__ctype_toupper'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__rtti_si'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__check_eh_spec'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__throw'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `ostream::operator<<(char const *)'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `terminate(void)'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__start_cp_handler'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__cp_pop_exception'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `exception type_info node'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__builtin_vec_new'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__eh_rtime_match'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__length_error(char const *)'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__builtin_vec_delete'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `exception virtual table'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__rtti_class'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__builtin_delete'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__builtin_new'
    /u01/app/oracle/product/9.2.0.5/lib//libocci.so: undefined reference to `__eh_alloc'
    collect2: ld returned 1 exit status
    make: *** [buildocci] Error 1
    so thinking I've got library problems I ran this:
    nm libocci.so:
    nm: libocci.so: no symbols,
    forgoing any particular program, I get this on 3 different programs here is a much simpler output from a personal copy of occidml.cpp, I ran this:
    /usr/bin/g++ -I$ORACLE_HOME/rdbms/demo -I$ORACLE_HOME/rdbms/public -L/home/gsmith/lib -t -o testcppora main.cpp -locci -lclntst9
    and got this:
    /tmp/ccVtuhIM.o(.gcc_except_table+0x104): undefined reference to `typeinfo for oracle::occi::SQLException'
    /tmp/ccVtuhIM.o(.gcc_except_table+0x15c): undefined reference to `typeinfo for oracle::occi::SQLException'
    /tmp/ccVtuhIM.o(.gcc_except_table+0x1b8): undefined reference to `typeinfo for oracle::occi::SQLException'
    /tmp/ccVtuhIM.o(.gcc_except_table+0x214): undefined reference to `typeinfo for oracle::occi::SQLException'
    /tmp/ccVtuhIM.o(.gcc_except_table+0x278): undefined reference to `typeinfo for oracle::occi::SQLException'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidmlC1ESsSsSs+0x20): In function `occidml::occidml(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode, void*, void* (*)(void*, unsigned int), void* (*)(void*, void*, unsigned int), void (*)(void*, void*))'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidmlD1Ev+0x2e): In function `occidml::~occidml()':
    : undefined reference to `oracle::occi::Environment::terminateEnvironment(oracle::occi::Environment*)'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x10): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x1d8): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&)'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x218): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::getErrorCode() const'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x25b): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::getMessage() const'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x2b7): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x2cb): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x342): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml10insertBindEiSs+0x35f): In function `occidml::insertBind(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x10): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x198): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&)'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x1d8): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::getErrorCode() const'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x21b): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::getMessage() const'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x277): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x28b): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x302): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9insertRowEv+0x31f): In function `occidml::insertRow()':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x10): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x1d8): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&)'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x218): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::getErrorCode() const'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x25b): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::getMessage() const'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x2b7): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x2cb): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x342): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9updateRowEiSs+0x35f): In function `occidml::updateRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x10): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x1d8): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&)'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x218): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::getErrorCode() const'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x25b): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::getMessage() const'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x2b7): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x2cb): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x342): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml9deleteRowEiSs+0x35f): In function `occidml::deleteRow(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x10): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x23d): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&)'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x27d): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::getErrorCode() const'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x2c0): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::getMessage() const'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x31c): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x330): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x3c5): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /tmp/ccVtuhIM.o(.gnu.linkonce.t._ZN7occidml14displayAllRowsEv+0x3e2): In function `occidml::displayAllRows()':
    : undefined reference to `oracle::occi::SQLException::~SQLException()'
    /usr/bin/ld: link errors found, deleting executable `testcppora'
    /usr/bin/ld: mode elf_i386
    /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../crt1.o
    /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../crti.o
    /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/crtbegin.o
    /tmp/ccVtuhIM.o
    -lstdc++ (/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libstdc++.so)
    -lm (/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libm.so)
    -lgcc_s (/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libgcc_s.so)
    /lib/libc.so.6
    (/usr/lib/libc_nonshared.a)elf-init.oS
    -lgcc_s (/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/libgcc_s.so)
    /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/crtend.o
    /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../crtn.o
    collect2: ld returned 1 exit status
    I've dug through the ld and gcc/g++ parameters and found nothing or create more linking problems. Someone suggested that the install of 9.2.0.5 Oracle C++ did not complete correctly...so I've asked our DBAs to see if they can relink that portion.
    If anyone has any other thoughts it would be greatly appreciated.
    Jerry.

    looks like you are using the wrong compiler. I think you should use gcc2.96 with OCCI 9.2.

  • Linking Error in OCCI

    hi Guys...
    please help me...
    i m new in c++ connectivity with Oracle using OCCI...
    following is my code which i wrote in Dev C++ using g++ compiler
    #include <occi.h>
    using namespace oracle::occi;
    int main() {
    Environment *env = Environment::createEnvironment();
    Environment::terminateEnvironment(env);
    return 0;
    Errors comming
    Compiler: Default compiler
    Executing g++.exe...
    g++.exe "C:\Dev-Cpp\bin\occ1.cpp" -o "C:\Dev-Cpp\bin\occ1.exe" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -I"E:\instantclient" -I"E:\oracle\product\10.2.0\db_1\OCI\include" -L"C:\Dev-Cpp\lib" -L"E:\instantclient"
    C:\DOCUME~1\MANSI\LOCALS~1\Temp/cc4Gcaaa.o(.text+0x52):occ1.cpp: undefined reference to `oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode, void*, void* (*)(void*, unsigned int), void* (*)(void*, void*, unsigned int), void (*)(void*, void*))'
    C:\DOCUME~1\MANSI\LOCALS~1\Temp/cc4Gcaaa.o(.text+0x60):occ1.cpp: undefined reference to `oracle::occi::Environment::terminateEnvironment(oracle::occi::Environment*)'
    collect2: ld returned 1 exit status
    Execution terminated
    tell me where I am wrong???

    hi Mark,
    Thanks So much for replying...
    Actually I am totally new in C++ connectivity with oracle 10g database..
    could u please help me because tomorrow i have an interview on this...n i wnt to learn some basics of creating a connection
    it would be great if u can give me some steps on how to create a c++ program ( what compliers , header files,library files ..on which location they should be) that can connect to oracle 10g database.
    plz it very urgent
    i have done searching on google...but didn't get good tutorial on this...
    thanks
    mansi

  • Oracle::occi::SQLException ORA-01804

    I'm trying to connect to my oracle server using OCCI, my code runs when I run it from any client. but when I try to run it under the server itself, I get this error:
    terminate called after throwing an instance of 'oracle::occi::SQLException'
    what(): Error while trying to retrieve text for error ORA-01804
    It seems to be somehow a timezone problem, but my server time zone is equal to the database time zone and both are +0330.
    Using JDBC connection I can connect to the oracle server from the server itself. I confirmed it using sqldeveloper.
    How can I solve the problem?

    This is from babelfish
    I am migrating a data base 8i to 10g I am in the change of pro*c to occi, when I compile leaves the following thing to me: : undefined reference to ` oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&) ' and other things the problem is that not if is a problem of path with librerias since it lowers librerias occi and it places in several sides but nothing, ademas I see that the file occiObjects.h has a problem in 146 line sera that what is the problem if alguin has solved to this please me envie the answer thanks. Daniel
    Best regards
    Maxim

  • Linker errors when linking OCCI 10.1.0  statically on RH AS 3.0 platform

    Hello All,
    I was trying to build an OCCI program on a Red Hat AS 3.0 Update 4 Platform, statically linking to OCCI libraries of Oracle 10.1.0 version. The g++ compiler version is 3.2.3.
    The Makefile and the errors that got generated is mentioned below. However, I could able to build the program when linking through shared library version of OCCI. My requirement is to build the program statically.
    I had been stuck up with this for almost a week and tried checking the previous postings in the forums/newsgroups, but not of much help. I added the following libraries :
    -lnbeq10 -lnhost10 -lnus10 -lnldap10 -lldapclnt10\
    -lnsslb10 -lntcp10 -lntcps10 -lnsslb10 -lntcp10 -lntns10
    to the Makefile, based on somebody's posting in OCI/OCCI forum. If I didn't provide
    -lpthread I get linker errors in pthread_xxx functions.
    Any help/pointers on this would be really appreciated.
    Makefile (static link)
    ======
    CXX=/usr/bin/g++
    ORA_HOME=/u01/app/oracle/product/10.1.0
    ifndef CXXFLAGS
    # Define C++ compiler flags to locate third-party header files as well as
    # any other options you may want.
    CXXFLAGS=-I${ORA_HOME}/rdbms/demo \
    -I${ORA_HOME}/rdbms/public \
    -I${ORA_HOME}/plsql/public \
    -I${ORA_HOME}/network/public
    endif
    # Include any header files in the current directoryj
    CXXFLAGS:=$(CXXFLAGS) -I . -g -static
    ifndef LDFLAGS
    # Define link paths for Oracle libraries.
    LDFLAGS=-L${ORA_HOME}/lib/ -L${ORA_HOME}/rdbms/lib/
    endif
    LIBS=-locci10 -lclntst10 -lnsl -ldl -lm \
    -lnbeq10 -lnhost10 -lnus10 -lnldap10 -lldapclnt10\
    -lnsslb10 -lntcp10 -lntcps10 -lnsslb10 -lntcp10 -lntns10 -lpthread
    #LIBS=${ORA_HOME}/lib/libocci10.a ${ORA_HOME}/lib/libclntst10.a -lpthread -ldl
    OCCIPROG=SCDBUtilTest
    OCCIOBJ=SCDBUtil.o SCDBUtilTest.o
    debug: ${OCCIPROG}
    ${OCCIPROG}: ${OCCIOBJ}
    ${CXX} ${CXXFLAGS} -o $@ ${OCCIOBJ} ${LDFLAGS} ${LIBS}
    clean:
    -rm -f $(OCCIPROG) $(OCCIOBJ)
    When ran make, below is the output generated.
    /usr/bin/g++ -I/u01/app/oracle/product/10.1.0/rdbms/demo -I/u01/app/oracle/product/10.1.0/rdbms/public -I/u01/app/oracle/product/10.1.0/plsql/public -I/u01/app/oracle/product/10.1.0/network/public -I . -g -static -c -o SCDBUtil.o SCDBUtil.cpp
    /usr/bin/g++ -I/u01/app/oracle/product/10.1.0/rdbms/demo -I/u01/app/oracle/product/10.1.0/rdbms/public -I/u01/app/oracle/product/10.1.0/plsql/public -I/u01/app/oracle/product/10.1.0/network/public -I . -g -static -c -o SCDBUtilTest.o SCDBUtilTest.cpp
    /usr/bin/g++ -I/u01/app/oracle/product/10.1.0/rdbms/demo -I/u01/app/oracle/product/10.1.0/rdbms/public -I/u01/app/oracle/product/10.1.0/plsql/public -I/u01/app/oracle/product/10.1.0/network/public -I . -g -static -o SCDBUtilTest SCDBUtil.o SCDBUtilTest.o -L/u01/app/oracle/product/10.1.0/lib/ -L/u01/app/oracle/product/10.1.0/rdbms/lib/ -locci10 -lclntst10 -lnsl -ldl -lm -lnbeq10 -lnhost10 -lnus10 -lnldap10 -lldapclnt10 -lnsslb10 -lntcp10 -lntcps10 -lnsslb10 -lntcp10 -lntns10 -lpthread
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(sqmul.o)(.text+0xab): In function `sqmul_dlopen':
    : Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(sntp.o)(.text+0x1089): In function `sntpcall':
    : Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(sntp.o)(.text+0x10a1): In function `sntpcall':
    : Using 'endgrent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(sntp.o)(.text+0xfa1): In function `sntpcall':
    : Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(si.o)(.text+0x14f): In function `sigunmu':
    : Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(sniq.o)(.text+0x224): In function `snigun':
    : Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(snlpc.o)(.text+0x1427): In function `snlpcgthstbyad':
    : Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(slputcp.o)(.text+0x245): In function `slputcpsockaddr':
    : Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(sgslun.o)(.text+0x2ef0): In function `sgslunGetHostName':
    : Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(snlpc.o)(.text+0xe90): In function `snlpcgthstent':
    : Using 'gethostent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(snlpc.o)(.text+0x1945): In function `snlpcgtsrvbynm':
    : Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(snlpc.o)(.text+0x1b8b): In function `snlpcgtsrvbypt':
    : Using 'getservbyport' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(snlpc.o)(.text+0x1702): In function `snlpcgtsrvent':
    : Using 'getservent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiStatementImpl.o)(.text+0x6ffb): In function `oracle::occi::StatementImpl::getObject(unsigned int)':
    : undefined reference to `OCIPAnyDataSetFlag'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiResultSetImpl.o)(.text+0xf99): In function `oracle::occi::ResultSetImpl::getBFloat(unsigned int)':
    : undefined reference to `lfpinit'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiResultSetImpl.o)(.text+0x10d9): In function `oracle::occi::ResultSetImpl::getBDouble(unsigned int)':
    : undefined reference to `lfpinit'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiResultSetImpl.o)(.text+0x1ca8): In function `oracle::occi::ResultSetImpl::getObject(unsigned int)':
    : undefined reference to `OCIPAnyDataSetFlag'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiResultSetImpl.o)(.text+0x48b6): In function `oracle::occi::ResultSetImpl::defineConvertBFloat(oracle::occi::ResultSetImpl::Define*, float*, unsigned int*, int)':
    : undefined reference to `lfpinit'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiResultSetImpl.o)(.text+0x49e2): In function `oracle::occi::ResultSetImpl::defineConvertBDouble(oracle::occi::ResultSetImpl::Define*, double*, unsigned int*, int)':
    : undefined reference to `lfpinit'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiTimestamp.o)(.text+0x1aa): In function `oracle::occi::Timestamp::Timestamp(oracle::occi::Environment const*, int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
    : undefined reference to `OCIPGetTZI'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiTimestamp.o)(.text+0x256): In function `oracle::occi::Timestamp::Timestamp(oracle::occi::Environment const*, int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
    : undefined reference to `OCIPGetTZI'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiTimestamp.o)(.text+0x302): In function `oracle::occi::Timestamp::Timestamp(oracle::occi::Environment const*, int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, std::basic_string<unsigned short, oracle::occi::utext_char_traits, std::allocator<unsigned short> > const&)':
    : undefined reference to `OCIPGetTZI'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiTimestamp.o)(.text+0x3be): In function `oracle::occi::Timestamp::Timestamp(oracle::occi::Environment const*, int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, std::basic_string<unsigned short, oracle::occi::utext_char_traits, std::allocator<unsigned short> > const&)':
    : undefined reference to `OCIPGetTZI'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiTimestamp.o)(.text+0x48a): In function `oracle::occi::Timestamp::do_TimestampConstruct(oracle::occi::Environment const*, int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, void*)':
    : undefined reference to `OCIPGetTZI'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiTimestamp.o)(.text+0xb42): more undefined references to `OCIPGetTZI' follow
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiSQLExceptionImpl.o)(.text+0x91): In function `oracle::occi::SQLExceptionImpl::getNLSMessage(oracle::occi::Environment*) const':
    : undefined reference to `OCIPGetErrorMessageNLS'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiSQLExceptionImpl.o)(.text+0x15b): In function `oracle::occi::SQLExceptionImpl::getNLSUStringMessage(oracle::occi::Environment*) const':
    : undefined reference to `OCIPGetErrorMessageNLS'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiAnyDataImpl.o)(.text+0x56): In function `oracle::occi::AnyDataImpl::AnyDataImpl(oracle::occi::Connection const*, OCIAnyData*, bool)':
    : undefined reference to `OCIPAnyDataSetUCIOptMode'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiAnyDataImpl.o)(.text+0x156): In function `oracle::occi::AnyDataImpl::AnyDataImpl(oracle::occi::Connection const*, OCIAnyData*, bool)':
    : undefined reference to `OCIPAnyDataSetUCIOptMode'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiAnyDataImpl.o)(.text+0x3ae): In function `oracle::occi::AnyDataImpl::AnyDataImpl(oracle::occi::AnyDataCtx const*)':
    : undefined reference to `OCIPAnyDataSetUCIOptMode'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiAnyDataImpl.o)(.text+0x4e6): In function `oracle::occi::AnyDataImpl::AnyDataImpl(oracle::occi::AnyDataCtx const*)':
    : undefined reference to `OCIPAnyDataSetUCIOptMode'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiAnyDataImpl.o)(.text+0x780): In function `oracle::occi::AnyDataImpl::setNull()':
    : undefined reference to `OCIPAnyDataSetNull'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiAnyDataImpl.o)(.text+0x1cc5): In function `oracle::occi::AnyDataImpl::setObject(oracle::occi::PObject const*)':
    : undefined reference to `OCIPAnyDataSetFlag'
    /u01/app/oracle/product/10.1.0/lib//libocci10.a(occiAnyDataImpl.o)(.text+0x2d6f): In function `oracle::occi::AnyDataImpl::getAsObject() const':
    : undefined reference to `OCIPAnyDataSetFlag'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lstclo.o)(.text+0x39): In function `lstclo':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lstclo.o)(.text+0x52): In function `lstclo':
    : undefined reference to `__ctype_tolower'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lstclo.o)(.text+0x6f): In function `lstclo':
    : undefined reference to `__ctype_tolower'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lstmclo.o)(.text+0x46): In function `lstmclo':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lstmclo.o)(.text+0x5f): In function `lstmclo':
    : undefined reference to `__ctype_tolower'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lstmclo.o)(.text+0x7c): In function `lstmclo':
    : undefined reference to `__ctype_tolower'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lxhcnv.o)(.text+0x366): In function `lxhcnv':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lxpname.o)(.text+0xc5): In function `lxpname':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(sl.o)(.text+0x405): In function `sltln':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(kge.o)(.text+0x2b19): In function `kgespf':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(kge.o)(.text+0x2d12): In function `kgespf':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(kgh.o)(.text+0x10d48): more undefined references to `__ctype_b' follow
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(kpuini.o)(.text+0x1d70): In function `kpufhndl0':
    : undefined reference to `wtcsrfre'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(kpuini.o)(.text+0x7e00): In function `kpuinit0':
    : undefined reference to `wtcsrin'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lcvb24.o)(.text+0x45): In function `lcvb24':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lcvb24.o)(.text+0x9a): In function `lcvb24':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lcvb2w.o)(.text+0x45): In function `lcvb2w':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lcvb2w.o)(.text+0x9a): In function `lcvb2w':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lpu.o)(.text+0x1c5): In function `lpuparse':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lpu.o)(.text+0xf62): more undefined references to `__ctype_b' follow
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lstlo.o)(.text+0x44): In function `lstlo':
    : undefined reference to `__ctype_tolower'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lstmup.o)(.text+0x43): In function `lstmup':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lstup.o)(.text+0x28): In function `lstup':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lstup.o)(.text+0x44): In function `lstup':
    : undefined reference to `__ctype_toupper'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lsxv.o)(.text+0x54f5): In function `LsxvParseDecimal':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lsxv.o)(.text+0x6da8): In function `LsxValidateBinary':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lsxv.o)(.text+0x7710): In function `LsxValidateLong':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lsxv.o)(.text+0xb274): In function `LsxvIsLanguage':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lsxv.o)(.text+0xb316): In function `LsxvIsLanguage':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lsxv.o)(.text+0xb3ac): more undefined references to `__ctype_b' follow
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(kpucc.o)(.text+0x271): In function `kpuccCacheErr':
    : undefined reference to `wtcLerr'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(kpucc.o)(.text+0x2a6): In function `kpuccMainErr':
    : undefined reference to `wtcMerr'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(kpucc.o)(.text+0x2e1): In function `kpuccGoRemote':
    : undefined reference to `wtclkm'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(kpucc.o)(.text+0x326): In function `kpuccGetStats':
    : undefined reference to `wtcstu'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lpxbuf.o)(.text+0x2a4f): In function `LpxbufSingleProcess':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(lstmlo.o)(.text+0x43): In function `lstmlo':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(nldt.o)(.text+0x9a1): In function `nldtstr2lv':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(nlfi.o)(.text+0x42f): In function `nlfifpf':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(nlfi.o)(.text+0x462): In function `nlfifpf':
    : undefined reference to `__ctype_b'
    /u01/app/oracle/product/10.1.0/lib//libclntst10.a(nlfi.o)(.text+0x4d4): more undefined references to `__ctype_b' follow
    collect2: ld returned 1 exit status
    make: *** [SCDBUtilTest] Error 1
    Thanks & Regards,
    Karthik D

    Hi ,
    Oh! Anyway, thanks for the information. However, the glibc version I use is glibc-2.3.2-95.30.
    There is a bit of story behind the reason we tried to use static linking. Actually, the application around which we use to develop solutions supports only Oracle 9i. We were developing some components using the C++ SDK provided by application vendor and that components need some information from DB for processing. So, we needed to write a DB class to do that. Since, we found Oracle supports C++ DB interface(OCCI), we thought to use that.
    We had to use RH AS 3.0 platform and the gcc compiler 3.2.x+ for compiling our component code. But Oracle 9i OCCI code doesn't get compiled with gcc/g++ 3.2.x+ compilers. So, we planned to use Oracle 10g OCCI libraries for building the DB class and link it to the custom component we had developed.
    In the run-time environment, we had to install both Oracle 9i clients and Oracle 10g clients since the app requires Oracle 9i and the custom component requires Oracle 10g. We did some kind of tweaking (by providing symbolic links to Oracle 10g OCCI libraries from Oracle 9i client directory) so that both the app and the component gets started.
    I know this is not a good idea. But we didn't want to spend much time on this at that time since we were doing a proof-of-concept. Later, we thought what could be done. We thought ,first we can try lthe custom component linked to static library version of OCCI. That's the reason we tried of static linking.
    The other option is to use OCI interface. But this is a bit of work since we need to write lot of wrapper methods to handle intricacies with OCI and OCI code is cumbersome compared to OCCI.
    Hope now you could have got the problem, I am talking about. Any other better ways?
    Thanks
    Karthik

  • Linker error when trying to build OCCI app on Solaris

    Hi,
    I tried to build an example that uses OCCI and here are the unresolved symbols.
    Undefined first referenced
    symbol in file
    oracle::occi::Environment*oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode,void*,void*(*)(void*,u
    nsigned),void*(*)(void*,void*,unsigned),void(*)(void*,void*)) OCIDBConnectionTest.o
    oracle::occi::MetaData::~MetaData() OCIDBConnectionTest.o
    ld: fatal: Symbol referencing errors. No output written to APR
    rm /tmp/c++filt.16625.1.err
    gmake: *** [APR] Error 1
    I am using SUN compiler, here is the version information.
    CC: Sun C++ 5.5 2003/03/12
    Thanks for help,
    Sai

    Dear Krishna,
    Thanks for your reply. The problem is with my link command, I was not linking in libocci. BTW, I am using version 9.
    Everything works now.
    Thanks again,
    Sai

Maybe you are looking for

  • Sound Setting for "Silent" or "Vibrate Only"?

    I'm new to the iPhone, having bought an iPhone 4 last week. I'm looking for a way to control the sounds with a little more granularity. Or maybe I'm just missing something. Here are some things I'd like to do: 1. Turn off the "outgoing SMS message" s

  • Windows Has stopped working

    have been getting this problem but no soloution Problem signature Problem Event Name:    BEX Application Name:    iTunes.exe Application Version:    10.5.3.3 Application Timestamp:    4f14cc3d Fault Module Name:    StackHash_0a9e Fault Module Version

  • IPhoto slideshow export -- Ken Burns "jerkiness" on playback

    Have an iPhoto slideshow of 25 pictures. On some, I used Ken Burns effect to zoom in, out, etc. When I export, the result is a .mov file. Everything looks great when I play it on Quicktime, except for some of the photos on which I had used Ken Burns

  • Need Help: Printing on network printer

    Hi. I have computer with shared printer. It has Fedora Core 5 operating system and CUPS. How can I print from my computer that is based on Solaris 10 to this printer (from Mozilla for example). I can access printer: print test pages and see it's jobs

  • App Store Not Allowing Updates to Download

    I am attempting to apply the updates found in the App Store, but I have had no success. This is a rather new development that began yesterday (11/9/11). I have a Mid-2009 MacBook Pro (2.26Ghz, 8 GB of RAM, 250 GB HDD, NVIDIA GeForce 9400M 256MB, and