AWT with static gcj
Thu Sep 21 08:16:00 GMT 2006
Tom Tromey wrote:
>>>>>> "Marco" == Marco Trudel <email@example.com> writes:
>>> In a --disable-shared build, there is no libgtkpeer.so that can be
>>> loaded dynamically.
> Marco> So, libgtkpeer.a is for the shared GCJ and libgtkpeer.so for the
> Marco> static? Why isn't libgtkpeer.so built then?
> No... libgtkpeer.a is a static library. libgtkpeer.so is a dynamic
> library. In a --disable-shared build, the .so is simply not build.
Ok, then one short time solution will be to do something with libltdl
and the long term solution would be to fix that in GNU classpath/GCJ so
that libgtkpeer.so will be built on --disable-shared?
Is this a big thing? Shall I fill in a bugreport?
> However, System.loadLibrary can only load dynamic libraries; static
> libraries simply can't be loaded at runtime.
Ok, now I understand. Thank you.
Stupid question (I'm not familiar with library handling):
Isn't it possible to create the dynamic lib out of this static lib?
The .a file is an ar archive, so I extracted it and got a lot of .o
files. I compiled these with:
g++ -shared *.o -o libgtkpeer.so -lgtk-X11-2.0 -lgdk-X11-2.0 -lXtst
Worked fine. Now I renamed libgtkpeer.so to libgtkpeer.a and tried again
(libgtkpeer.so wasn't searched/used). I got a simple "Aborted" Message
when trying to start a binary that uses AWT...
thanks for your time
More information about the Java