exception handling

Jeff Sturm jsturm@one-point.com
Thu Sep 18 07:07:00 GMT 2003


On 2003年9月17日, 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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /