I have installed Oracle Instant Client 12.1 (basic and SDK) and Ocilib 4.0.1 on my Oracle Linux 7.1 virtual machine.
$ORACLE_HOME
is /usr/lib/oracle/12.1/client64
$LD_LIBRARY_PATH
is /usr/lib/oracle/12.1/client64/lib:/usr/local/lib
To install ocilib I specified the oracle home, oracle lib path and oracle headers path (./configure --with-oracle-home=/usr/lib/oracle/12.1/client64 --with-oracle-lib-path=/usr/lib/oracle/12.1/client64/lib --with-oracle-headers-path=/usr/include/oracle/12.1/client64
)
In my project's properties in eclipse, in GCC C Linker's Libraries Search (-L) Path I have /usr/lib/oracle/12.1/client64/lib and /usr/local/lib
and in Libraries (-l) I have ocilib, clntsh, clntshcore, nnz12, mql1, ipc1, ons
(all of them were necessary to compile succesfully).
When I try to debug it show this: error while loading shared libraries: libocilib.so.4: cannot open shared object file: No such file or directory
But I have libocilib.so.4
on /usr/local/lib
(it's a link to libocilib.so.4.0.1, I also have the link libocilib.so pointing to libocilib.so.4.0.1), so I don't know why it cannot load that library.