1 Reply Latest reply: Oct 29, 2012 3:25 AM by 943610 RSS

    Pro*C compiled on 11g should load libclntsh.so of 10g

    922861
      Is it possible that a program compiled with ORACLE 11g Pro*C compiler to load libclntsh.so of 10g ?
      My problem is source compiled on 10g works fine for even when connected to 11g database. But it get crashed with compiled on 11g and run in same environment.
      Can any please help?
        • 1. Re: Pro*C compiled on 11g should load libclntsh.so of 10g
          943610
          Pro*C doesn't compile the program. It just creates a .c file.
          Then you compile and link it with the library libclntsh.so
          libclntsh.so -> libclntsh.so.11.1
          libclntsh.so.10.1 -> libclntsh.so

          To fool the compiler you have to COPY the data of the library:
          mkdir ~/1
          cd ~/1
          cat $ORACLE_HOME/lib/libclntsh.so > libclntsh.so.10.1
          ln -s libclntsh.so.10.1 libclntsh.so
          gcc -L$HOME/1 -lclntsh
          BTW, what do you mean by crashing? If you try to run the compiled program and it can't find the library, it's not a crash