This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Problem compiling DLL
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: daniel dot adolfsson at gmail dot com
- Cc: GCJ <java at gcc dot gnu dot org>
- Date: Thu, 06 Sep 2007 10:19:43 +1200
- Subject: Re: Problem compiling DLL
At http://gcc.gnu.org/ml/java/2007-09/msg00013.html
Daniel Adolfsson wrote:
> gcj -o HelloWorld.exe --main=HelloWorld --classpath=. -L. -ltest
HelloWorld.java
I don't know if this is the whole problem but, in win32-land, dll import
libraries (eg libtest.a) are static stub archives and must follow the
objects which depend open the library, otherwise the symbols will not be
resolved (no lazy binding). So try:
gcj -o HelloWorld.exe --main=HelloWorld HelloWorld.java --classpath=.
-L. -ltest
A second problem that you may encounter with libgcj is that in order for
it to communicate exceptions across dll/dll or dll/exe boundaries, all
components must be built with -shared-libgcc.
Danny