This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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 static link fails


Nope... libgcj.a is not provided by the debian package maintainers. Is there a way to link it static with only the .so?

Martijn Bogaard

David Daney schreef:
J. M. Bogaard wrote:
When i try to static link a app, compiled with gcj i get:

/usr/bin/ld: cannot find -lgcj
collect2: ld returned 1 exit status

I try to compile it with: gcj --main=HelloWorld -o HelloWorld HelloWorld.java --static

My OS is Debian Testing with GCJ 4.3. All relevant packages are installed.

I hope somebody know a solution.


Do you have libgcj.a installed? Probably you will want to use -static-libgcj instead of --static.


Also be forewarned that static linking with gcj is very tricky. You might want to read the Wiki:

http://gcc.gnu.org/wiki/Statically_linking_libgcj

David Daney


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