3 Replies Latest reply: Apr 30, 2012 7:04 AM by Sudheendra RSS

    Compiling the OCCI application on linux

    sree_466
      Hi,

      i have the OOCI application which will connect to oracle database using OCCI.
      i have added oraocci11.lib in the additional libs and working fine.
      In linux i have added –locci and –lclntsh and compiling good.
      it is not giving any linker errors even i remove –locci and –lclntsh these in compiler options.
      please help me understanding how these libraries work in linux.
      i have libclntsh.so.11.1 , libnnz11.so, libocci.so.11.1, libociei.so and libocijdbc11.so libraries.
      Do we need to have any .a files to add to the additional libraries.
      how does it work????
      Pelase help.

      Thanks,
      Sreekanth Polaka
        • 1. Re: Compiling the OCCI application on linux
          Sudheendra
          Can you post your compile and link line.
          BTW oraocci11.lib is a Windows library and when you say you have added that in additional libs and working fine I am unable to understand.
          For an OCCI application to successfully compile and work
          - you need to pass -I$ORACLE_HOME/rdbms/public during compilation to pick the headers
          - pass -L$ORACLE_HOME/lib -locci -lclntsh during linking.
          libclntsh.so.11.1 is the client library every application connecting to server is required to link with
          libocci.so.11.1 is required if your application is an OCCI application
          libocijdbc11.so is required for JDBC applications
          libociei.so is required if you want your application to run in Instant Client Mode.
          • 2. Re: Compiling the OCCI application on linux
            sree_466
            Hi,
            My application runs on both windows and Linux.
            In the windows i add the library oraocci11.lib for the linking. if i remove the library i will receive link error.
            But in Linux i am not receiving link error even if i remove -locci -lclntsh during the link.
            I am concerned how the OCCI function calls are getting resolved in linux.
            Please help.

            Thanks,
            Sreekanth Polaka
            • 3. Re: Compiling the OCCI application on linux
              Sudheendra
              Can you pls post your compile & link line