This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Static linking with JNI-Libs possible?
- From: Tom Tromey <tromey at redhat dot com>
- To: "Ranjit Mathew" <rmathew at hotmail dot com>
- Cc: "Clemens Eisserer" <linuxhippy at web dot de>, <java at gcc dot gnu dot org>
- Date: 15 Apr 2003 22:48:23 -0600
- Subject: Re: Static linking with JNI-Libs possible?
- References: <3E9C752B.1060702@web.de><Law14-OE12qtQvAauNj000003ba@hotmail.com>
- Reply-to: tromey at redhat dot com
>>>>> "Ranjit" == Ranjit Mathew <rmathew4lists at hotmail dot com> writes:
Ranjit> Yes, Erik has done this before. IIRC, he compiled SWT into a
Ranjit> static library, omitting the calls to System.loadLibrary( ...)
I think this should be possible without changing the sources to omit
loadLibrary calls, by using the libltd preload feature.
You might need a custom main(), or perhaps some init function called
pretty early.
I've never tried this. So maybe it doesn't work at all.
See "(libtool.info)Libltdl interface" -- search for lt_dlpreload.
Tom