libgcj, Win32 & dll's
Jeff Sturm
jsturm@sigma6.com
Sat Apr 1 00:00:00 GMT 2000
Tom Tromey wrote:
> Jeff> BUT... all of libgcj is static-linked so far. Libtool has no
> Jeff> idea how to build a shared library on Win32, so I attempted to
> Jeff> convert libgcj.a into libgcj.dll somehow, knowing nothing about
> Jeff> DLLs in the process.
>> I thought libtool could do this. In fact I thought Ian wrote a bunch
> of changes to libtool specifically so that it could do this. Maybe
> this code doesn't work right now? I admit I haven't kept up with it;
> I rarely develop for Windows.
The version of libtool we have seems to know about DLLs, but they have
been disabled, judging from the comments in the code.
But aside from libtool... I tried to build a libgcj DLL by hand, and
failed. The reason is that global, shared data symbols are impossible
in DLLs. Gcj relies extensively on global data symbols (like
__vt_Q34java4lang5Class) and there's just no way to link these from a
DLL.
G++ doesn't have this issue apparently because each object file computes
the needed vtables, so only text symbols are shared.
--
Jeff Sturm
jsturm@sigma6.com
More information about the Java
mailing list