0

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.

myrmix
  • 371
  • 3
  • 11
  • 25
  • Are you saying you get that error when you compile; or when you run your compiled program? -L is not inherited by the executable; -R might be of interest, or you could change the system ld path, or - to test at least - set LD_LIBRARY_PATH? – Alex Poole May 25 '15 at 22:40
  • I can build the project, I get the error when I run the compiled program. In eclipse, where can I specify -R? And you mean setting LD_LIBRARY_PATH in eclipse (Project->Properties->C/C++ Build->Environment)? – myrmix May 25 '15 at 22:55
  • Thanks, it worked after I set LD_LIBRARY_PATH in eclipse. – myrmix May 28 '15 at 04:20

0 Answers0