This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCJ - undefined reference
- From: Andrew Haley <aph at gcc dot gnu dot org>
- To: Jerome Benezech <jbenezech at yahoo dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 31 Mar 2007 10:41:15 +0100
- Subject: Re: GCJ - undefined reference
- References: <336073.18913.qm@web32214.mail.mud.yahoo.com>
Jerome Benezech writes:
> I am using GCJ 4.2.0 to compile my java app into a
> win32 exe. My app uses external jars like log4j. I use
> the makefile built by eclipse plugin GCJBuilder.
>
> So the external libraries have been compiled into .o
> object files as well as all my java classes. During
> the compiling/linking (??) process, I get these
> "undefined reference" errors from external jars
> classes like log4J but also from my own java classes.
>
> Any help would be greatly appreciated.
> An error from the external jar:
>
> C:/MesDocuments/_dev/CocoonWorkspace/Compilation/org/apache/log4j/config/PropertyPrinter.java:113:
> undefined reference to
> `_ZN4java3awt9Component18firePropertyChangeEJvPNS_4lang6StringEff'
java.awt.Component.firePropertyChange(java.lang.String, float, float)void
is a Java 1.5 method. It's in the gcc 4.2 branch, not the 4.1 branch.
> An error from one of my own class:
>
>
> C:/MesDocuments/_dev/CocoonWorkspace/Compilation/cafe/AdCafeProperties.java:272:
> undefined reference to `cafe::AdCafeException::class$'
Not sure about that. It certainly should be there: I'd use nm to
inspect cafe/AdCafeException.o.
Andrew.