I compiled my Proc*C code on Red Hat Enterprise Linux Server release 6.0 (Santiago) with Oracle 12C setup. It was working fine . When I migrated the same executable to another server with Oracle 11G set up , I get this issue "libclntsh.so.12.1: cannot open shared object file." I have properly exported ORACLE_HOME and LD_LIBRARY_PATH in .bash_profile.
On running ldd command I get - libclntsh.so.12.1 => not found
My makefile compilation for the exe is :
gcc -o libexceptiondal.so -shared -Wl /oradata1/JSEDev/Application/Source/Dal/Objects/Abc.o -L. -L/usr/lib64 -lstdc++ -L/oracle/ora12cu/app/ora12cu/product/12.1.0/dbhome_1/lib -lclntsh -L/oradata1/JSEDev/Application/Lib -lLog4Cpp2
Now can anyone tell me why the exe is looking for libclntsh.so.12.1 when while compiling I never mentioned the version of libclntsh.so library. How can I make my exe oracle version independent . Can anyone please shed some light on this.