This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Static linking of JNI code - HOW?
- From: "Craig A. Vanderborgh" <craigv at voxware dot com>
- To: java at gcc dot gnu dot org
- Date: 09 Jun 2003 13:51:38 -0600
- Subject: Static linking of JNI code - HOW?
Hello All:
We are creating an application with GCJ and we wish to statically link
our JNI code to bypass the whole shared library mess. I have been able
to statically link in my JNI code, but the runtime is still looking for
the code in a lib:
# hello.exe
Exception in thread "main" java.lang.UnsatisfiedLinkError: print
<<No stacktrace available>>
ULE, everyone's favorite!! How can I set myself up so that our JNI code
is linked in statically?
The test program was created with:
arm-wince-pe-gcj -fjni --main=HelloWorld HelloWorld.java \
helloworld.o -lgcj -lgcc -lc -lwinsock -lcoredll
where "helloworld.o" (lowercase) contains the native call. What to we
have to do to get JNI to work with static linking??
TIA,
craig vanderborgh
voxware incorporated