This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: exception handling
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Christian Stuellenberg <gcj at stuellenberg dot de>
- Cc: java at gcc dot gnu dot org
- Date: Wed, 17 Sep 2003 22:03:43 -0400 (EDT)
- Subject: Re: exception handling
On Wed, 17 Sep 2003, Christian Stuellenberg wrote:
> Then again tried to recompile my example program with
> $ mingw32-gcj -o c.exe --main=CCTest CCTest.java -L. -lgcj_d \
> -Wl,--enable-runtime-pseudo-reloc
This will implicitly try to link libgcj.a along with your libgcj_d.dll.
That's where the 'multiple definition' errors come from.
> So, what I'm doing wrong here?
> Is my libgcj_d.dll[.a] not correctly build?
> For what purpose do I need the libgcj_d.dll.a?
> Why does the gcj not use my generated libgcj.dll?
I don't know. DLL support for Windows is still very experimental.
I could suggest you compare to how --enable-shared is implemented for GNU
targets, on which GCC produces a libgcc.a (static) and libgcc_s.so
(dynamic) for runtime and EH support, along with libgcj.a and libgcj.so.
For dynamic builds both your main executable and libgcj.{so,dll} must link
to the shared libgcc_s.{so,dll}.
GCC currently does not build a shared libgcc_s.dll for Windows. You could
try replacing libgcc.a with a libgcc.dll before you build libgcj.dll, and
see how far you get.
Jeff