How to load multiple shared libraries
984427Jan 19 2013 — edited Jan 19 2013Hi,
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?
Thanks.