This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Static linking of C-Libs with CNI possible?
- From: Tom Tromey <tromey at redhat dot com>
- To: Clemens Eisserer <Linuxhippy at web dot de>
- Cc: java at gcc dot gnu dot org
- Date: 14 Feb 2003 15:03:22 -0700
- Subject: Re: Static linking of C-Libs with CNI possible?
- References: <200302141519.h1EFJbe17687@mailgate5.cinetic.de>
- Reply-to: tromey at redhat dot com
>>>>> ">" == Clemens Eisserer <Linuxhippy@web.de> writes:
>> 1.) With JNI it isnt possible to put all needed libraries into the
>> executable, because JNI loads them with dlopen().
That's mostly true. You can probably make it work with ltdl
prelinking, but that hasn't been extensively tested.
>> But is it possble with CNI to link all C-Libs statically into the
>> java-binary and remove all unneeded symbols with strip?
Yes. We link the our own native code into libgcj.
>> 2.) JNI didnt work for me, when I linked libgcj statically against
>> my binary, the program crashed with a segfault (I had this problem
>> with several different jni-libraries) Does this work with CNI?
It's hard to say. We don't know why your program is crashing.
Tom