I am wrapping a shared library (written in C) using Java using JNA. The shared library is written internally, but this library uses functions from another external library, which again depends on another external library. So the situation is something like this:
ext1 <- ext2 <- internal
those. the internal uses the ext2 external library, which again uses the ext1 external library. I tried:
System.loadLibrary("ext1");
System.loadLibrary("ext2");
NativeLIbrary.loadLibrary("internal",xxx.class);
This approach does not work with "UnresolvedException" when loading the "ext2" library; the linker complains about the characters that are really present in the ext1 library. So, is it semmes that the System.loadLibrary () function does not make the characters from "ext1" globally accessible? When using the stdlib dlopen () function as:
handle = dlopen( lib_name , RTLD_GLOBAL );
All characters found in @lib_name will be available for character resolution on subsequent loads; I guess I would like something similar for the java variation of System.loadLibrary ()?
Regards - Joakim Hove
source
share