1 Reply Latest reply on Jan 19, 2013 10:49 PM by EJP

    How to load multiple shared libraries


      I have 2 shared libraies, libshared1.so and libshared2.so. The libshared2.so depends on libshared1.so. I built the libshared2.so using the command below.

      g++ -shared -L./path/to/lib -lshared1 -o ./path/to/lib2/libshared2.so ./myWorkCpp.o

      I got following errors when I ran my Java class.

      Native code library failed to load.
      java.lang.UnsatisfiedLinkError: /path/to/libshared2.so: libshared1.so: cannot open shared object file: No such file or directory

      Can anyone please help?