This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj problem with -static option



> And if I try :
> > gcc -o HelloWorld HelloWorld.o HelloWorldmain.i -shared-libgcc -Wl,-non_shared -lgcj -lz -lc -lm -ldl -Wl,-call_shared -lgcc_s -lpthread
> I have :
> ./HelloWorld: relocation error: ./HelloWorld: symbol __pthread_initialize, version GLIBC_PRIVATE not defined in file libpthread.so.0 with link time reference


Uh, OK. Don't statically link against libc.

Andrew.

The -Wl,-non_shared and -Wl,-call_shared should surround only the -lgcj. If you look at the Wiki article, you will see that it does it this way.


Perhaps you should try it *exactly* like the Wiki article, then experiment once you have that working.

David Daney.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]