This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Static linking with JNI-Libs possible?


> So is it possible to link everything except of the "other dynamic 
> libraries" into one single executable (with static libgcj) ?
> Is this also possible with the mingw32-build?

Yes, Erik has done this before. IIRC, he compiled SWT into a 
static library, omitting the calls to System.loadLibrary( ...)
and making sure that all SWT symbols are properly exported
either via an explicit "exports" file or (better) with the
latest MinGW binutils snapshot that allows EXEs to export
symbols (binutils-2.13.90-20030111):

http://prdownloads.sourceforge.net/mingw/binutils-2.13.90-20030111-1.tar.gz

Even after this, you *might* have to ask the linker to
search the libraries repeatedly to resolve circular
dependencies by using this with gcj in the final
command to link everything:

-Wl,--start-group <all-swt-libraries-here> -Wl,--end-group

Erik is the guru of this voodoo here, so if I've
missed out something he should be able to point it out.

Ranjit.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]