Forum Stats

  • 3,769,910 Users
  • 2,253,029 Discussions
  • 7,875,236 Comments

Discussions

Oracle Proc undefined reference to `sqlcxt'

palkina
palkina Member Posts: 4
edited May 13, 2015 9:29AM in Oracle Call Interface (OCI)

Hello,

We're trying to configure Oracle Proc (instantclient-sdk-linux.x64-12.1.0.2.0.zip) under Oracle Linux 6.5.

After tweaking the Makefile and nbproject/Makefile-Debug.mk we were able to have proc to run properly and have the make start. However, it fails during the linker phase with error

/home/userdev1/SolStudioProjects/DbApplication_1/main.pc:113: undefined reference to `sqlcxt'

build/Debug/GNU-Linux-x86/main.o:/home/userdev1/SolStudioProjects/DbApplication_1/main.pc:115: more undefined references to `sqlcxt' follow

collect2: ld returned 1 exit status

Does somebody know I may be missing to fix this?

Many thanks in advance

Best Answer

  • palkina
    palkina Member Posts: 4
    edited May 13, 2015 9:29AM Accepted Answer

    Solution found.

    After trying to set environment variables and sort of, the only solution found was to

    hard code these libraries in Makefile as required:

    PROC=/ora/oracle/product/12.1.0/client_1/bin/proc

    OIC_INCLUDE_PATH=/ora/oracle/product/12.1.0/client_1/sdk/include

    OIC_LIBRARY_PATH=/ora/oracle/product/12.1.0/client_1/precomp/lib

    PROC_PRECOMPILER_Debug=${PROC}

    OIC_INCLUDE_PATH_Debug=${OIC_INCLUDE_PATH}

    OIC_LIBRARY_PATH_Debug=${OIC_LIBRARY_PATH}

    And add the following library into the gcc command:

    /ora/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1

    Or if using the SolarisStudio add into the Linker tab the above library

Answers

  • palkina
    palkina Member Posts: 4
    edited May 13, 2015 9:29AM Accepted Answer

    Solution found.

    After trying to set environment variables and sort of, the only solution found was to

    hard code these libraries in Makefile as required:

    PROC=/ora/oracle/product/12.1.0/client_1/bin/proc

    OIC_INCLUDE_PATH=/ora/oracle/product/12.1.0/client_1/sdk/include

    OIC_LIBRARY_PATH=/ora/oracle/product/12.1.0/client_1/precomp/lib

    PROC_PRECOMPILER_Debug=${PROC}

    OIC_INCLUDE_PATH_Debug=${OIC_INCLUDE_PATH}

    OIC_LIBRARY_PATH_Debug=${OIC_LIBRARY_PATH}

    And add the following library into the gcc command:

    /ora/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1

    Or if using the SolarisStudio add into the Linker tab the above library

This discussion has been closed.