JNI and static links?

I am attempting to create a jni library that contains a static link to another library. It compiles correctly and it works fine through any other language however when java attempts to load it I receive a Invalid access to memory location exception upon load. This happens with all jni libraries I attempt to compile with static links. The library im attempting to compile links to a very old version of bigdigits that I can't find the source code for to compile it in. Can someone tell me why static links cause the jvm to throw memory exceptions and how to fix it or a place to download the source of old versions of bigdigits?

[637 byte] By [Sakraga] at [2007-11-26 15:25:47]
# 1

static linking can be tricky if you try to link in too many libraries. You don't want to statically link everything into a shared library because then you can end up with multiple copies of libc which causes very bad things to happen. What does you link command look like? Commonly with Sun's cc you'd say something like -Bstatic -lbigdigits -Bdynamic which switches to static linking just for bigdigits and then switches back to dynamic linking for the rest of the libraries. For gcc I think the syntax is -Wl,-Bstatic -lbigdigits -Wl,-Bdynamic. The important thing is that you only want to dynamic link just that one library. If you're already doing that and you still die then posting more details about the crash might help.

tom

neverevera at 2007-7-8 21:41:24 > top of Java-index,Java HotSpot Virtual Machine,Specifications...