> I've created a C shared library (libSysEventProxy.so) that contains
> a JNI wrapper that calls functions in another shared library
[quoted text clipped - 7 lines]
> System.loadLibrary( "SysEventProxy" );
> }
When you build a shared library with dependencies on another shared
library, you need to specify the dependencies at link time.
Here's one way:
gcc -Wall $JNIFLAGS -fPIC SysEventProxy.c -o SysEventProxy.o
gcc -shared -f libnetcomm.so SysEventProxy.o -o libSysEventProxy.so
At run time (also when using ldd, see below), the libraries
libSysEventProxy.so depends on need to be in places where the dynamic
linker can find them. That means one of /lib, /usr/lib, or a directory
mentioned in /etc/ld.so.conf, or in LD_LIBRARY_PATH.
Use "ldd libSysEventProxy.so" to see what runtime dependencies your
resulting library has, and which ones are still unresolved.
In your java application, just load libSysEventProxy.so, not the
others. Symbols loaded by one call to loadLibrary() are not visible to
code loaded in separate calls to loadLibrary().
/gordon

Signature
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e