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]

libgcj.dll for MingW GCJ 3.4


Hi People,

Here is my attempt to make MingW GCJ 3.4 create
small executables which require libgcj.dll at runtime.

This is a followup to this:

http://gcc.gnu.org/ml/java/2003-06/msg00190.html

I never was able to get libgcj.dll and libswt.a
to play with each other. There are classloading
and/or vtable issues, I think. Haven't investigated
this at all.

So, following Tom's strategy of having ideas while
lying in bed, I thought of combining libgcj.a and libswt.a
into a mega libgcj.dll. This seems to work.

To join in the fun, download this:

http://www.thisiscool.net/gcc34-20030802-dll.zip

This applies on top of gcc34-20030802.zip (see
my main page http://www.thisiscool.com/gcc_mingw.htm)
Unzip this to the same directory you unzipped
gcc34-20030802.zip to. THIS WILL OVERWRITE libgcj.a
and libgcj.spec, so be sure to inspect the contents
of gcc34-20030802-dll.zip first and back up any files as
you see fit. This is highly experimental stuff.

The samples in thisiscool-gcc\examples should build
unchanged, except the executables will be much tinier.
An exception to this is HelloSWT, which builds using
build-shared.bat, which is essentially the same as build.bat
except the -lswt has been removed because all of the
SWT stuff has been folded into libgcj. (Yes, I know
this isn't pretty. If you know a better way, tell me.)

Note that most of the generated executables in the
examples directory contain debugging information; you
can further reduce their size by passing them to
strip.exe (thisiscool-gcc\gcc-3.4\i686-pc-mingw32\bin)
or else specifying -s as an additional flag to gcj.

To run the executables, you need to move libgcj.dll
from thisiscool-gcc\gcc-3.4\dll to somewhere in your
system path.

I haven't played with this all that much, so let me
know how you fare with this. And thanks to all of the
gcc, gcj and Cygwin and MinGW hackers that made this
possible.

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/




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