Converting a JAR into a gcj-statically-linked SO
David Daney
ddaney@avtrex.com
Tue Jan 8 17:37:00 GMT 2008
Matthijs van de Water wrote:
> On Jan 7, 2008 2:42 PM, Andrew Haley <aph@redhat.com> wrote:
>>> You don't seem to be linking your shared library statically against
>> libgcj. You must use the -static-libgcj option.
>>> Changing my compile line into
> $ gcj -o libmynative.so -shared -fPIC native_lib.cc MyJavaLib.o
> -lstdc++ -shared-libgcc -static-libgcj
>
That won't work. The static libgcj (libgcj.a) is not compiled with
-fPIC, so it cannot be used in a shared object.
David Daney.
More information about the Java
mailing list