This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Static build failing to load classes
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: scottg at mantatest dot com (Scott Gilbertson)
- Cc: java at gcc dot gnu dot org
- Date: Wed, 16 Nov 2005 18:02:59 -0500 (EST)
- Subject: Re: Static build failing to load classes
>
> I'm trying to do a static build with today's gcj code. With a trivial java
> program,
> it crashes, apparently unable to load a class I'm reasonably sure is
> included
> in the binary. Is this a known problem?
This is the standard no static linking issue. Try -Wl,--whole-archive
before -lgcj, this will make static linking pull in the whole library
so that all the classes are there.
Thanks,
Andrew Pinski