LibGCJ static linking trouble
David Daney
ddaney@avtrex.com
Wed Nov 15 17:47:00 GMT 2006
Thomas Womack wrote:
>> Hello all.
>> I'm following the instructions in
> http://gcc.gnu.org/wiki/Statically%20linking%20libgcj
> for compiling things so that they don't need libgcj.so at runtime.
>> The final link-it-all-together line in my makefile is (remove carriage
> returns as needed)
>> $(EXECOUT)/%: %-adaptor.o globalphasing/maketnt/%.o $(maketntlibs)
> $(javalibs)
> $(GCJ) -o $(EXECOUT)/$* $^ -shared-libgcc -Wl,-non_shared -lgcj
> -Wl,-call_shared -lsupc++ -Wl,--as-needed -lz -lgcc_s -lpthread -lc -lm
> -ldl -Wl,--no-as-needed
>
You will notice that the Wiki suggested linking using gcc and not gcj.
The recommendation still stands.
More information about the Java
mailing list