Problem compiling DLL

Daniel Adolfsson daniel.adolfsson@gmail.com
Thu Sep 6 07:13:00 GMT 2007


> 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.

I think I've tried every possible combination.
Maybe I didn't compile gcj.dll properly? Could that affect anything?
The cross-gcc compiler was configured with:
 --enable-languages=c,c++,java
 --disable-shared --enable-static
 --disable-nls --disable-debug --disable-checking
 --enable-threads=win32 --disable-win32-registry --enable-sjlj-exceptions
 --enable-libgcj --without-x --disable-java-awt
gcj.dll was compiled using:
find . -name "*.o" | uniq > objectlist
i686-pc-mingw32-gcj -shared `cat objectlist` -o gcj.dll
-Wl,--out-implib,libgcj.a -Wl,--export-all-symbols
-Wl,--enable-runtime-pseudo-reloc -Wl,--allow-multiple-definition
Daniel


More information about the Java mailing list

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