Problem compiling DLL
Danny Smith
dannysmith@clear.net.nz
Wed Sep 5 22:19:00 GMT 2007
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
More information about the Java
mailing list