This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Static linking of JNI code - HOW?
- From: Tom Tromey <tromey at redhat dot com>
- To: "Craig A. Vanderborgh" <craigv at voxware dot com>
- Cc: java at gcc dot gnu dot org
- Date: 09 Jun 2003 19:31:25 -0600
- Subject: Re: Static linking of JNI code - HOW?
- References: <1055188305.6986.218.camel@zetar>
- Reply-to: tromey at redhat dot com
>>>>> "Craig" == Craig A Vanderborgh <craigv@voxware.com> writes:
Craig> The test program was created with:
Craig> arm-wince-pe-gcj -fjni --main=HelloWorld HelloWorld.java \
Craig> helloworld.o -lgcj -lgcc -lc -lwinsock -lcoredll
Craig> where "helloworld.o" (lowercase) contains the native call.
Craig> What to we have to do to get JNI to work with static linking??
Something like that should work. However:
* make sure that the required JNI function really ends up in the
executable (it probably does)
* JNI still relies on being able to look up symbols in the
executable. This is probably the problem you're running into.
You'd have to debug to make sure. One workaround would be to use
RegisterNatives.
Tom