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: "Erik Poupaert" <erik dot poupaert at chello dot be>
- To: "Linuxhippy" <linuxhippy at web dot de>
- Cc: <java at gcc dot gnu dot org>
- Date: Sat, 15 Feb 2003 14:25:41 +0100
- Subject: RE: Static linking of C-Libs with CNI possible?
>>> You said you can link swt statically. Does that mean your binary
>>> contains the Java-Code, the Java-JNI-Part and the C-Lib (.dll) ?
Indeed, my executable is fully self-contained. It does not reference
anything outside its own symbols (and the win32 platform/system dlls). So, I
do not deploy any dll.
>>>> Hmm, I simply need to generate such a .defs file and then compile with
>>>> that file? Hmm..
>>>> In those articles there was used a tool calles "dlltool" to generate
the
>>>> .defs-files, does such a tool also exist for Linux?
Well, that's a bit of a win32 thing. What you need to do is to make sure
your executable exports the symbols of its statically linked libraries; or
at least, the ones that contain jni symbols.
I just link the ".exp" file. I don't know how you can add symbols to export
in an executable in Linux. I'm confident it is possible, because otherwise
the natRuntime.cc code wouldn't make any sense; and it was written before
gcj could run on Windows.
Does anybody else know how you do this on Linux?