This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
GCJ - undefined reference
- From: Jerome Benezech <jbenezech at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 30 Mar 2007 21:13:28 -0700 (PDT)
- Subject: GCJ - undefined reference
- Reply-to: jbenezech at bigfoot dot com
Hi All,
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.
The compile line is like this:
gcj -O2 -g3 -fjni
-ID:\Software\Programming\gcc-119844-win\share\awt\gui.jar
-IC:/MesDocuments/_dev/CocoonWorkspace/Compilation/lib
--main=cafe.main.UpdateLauncher
debug/./commons-net-1.4.1.jar.o debug/./ethermac.jar.o
debug/./jakarta-oro-2.0.8.jar.o
debug/./jdic_misc.jar.o debug/./jdic-native.jar.o
debug/./jRegistryKey.jar.o debug/./log4j-1.2.12.jar.o
cafe/AdCafeException.o cafe/AdCafeProperties.o
cafe/Updater.o cafe/MsWinSvc.o
cafe/configuration/Configurator.o
cafe/configuration/PCConfig.o
cafe/configuration/BasePCConfig.o
cafe/main/UpdateInstaller.o
cafe/main/TestUpdateInstaller.o
cafe/main/ConfiguratorLauncher.o
cafe/main/TestReporterLauncher.o
cafe/main/ReporterLauncher.o
cafe/main/TestUpdaterLauncher.o
cafe/main/TestConfiguratorLauncher.o
cafe/main/UpdateLauncher.o cafe/main/Test.o
cafe/reporter/LogFileReporter.o
cafe/reporter/StatisticsReporter.o
cafe/reporter/Reporter.o
cafe/reporter/ActivityReporter.o
cafe/updater/LocalUpdateWrapper.o
cafe/updater/SoftwareUpdater.o
cafe/updater/CafeConfigUpdater.o
cafe/updater/AdsUpdater.o
cafe/updater/RemoteAdsUpdater.o
cafe/updater/RemoteCafeConfigUpdater.o
cafe/updater/UpdateWrapper.o
cafe/updater/FtpUpdateWrapper.o
cafe/updater/RemoteSoftwareUpdater.o
cafe/updater/LocalAdsUpdater.o
cafe/updater/LocalSoftwareUpdater.o
cafe/updater/LocalCafeConfigUpdater.o
cafe/updater/Updater.o cafe/util/RegistryUtil.o
cafe/util/FileZipper.o cafe/util/JakartaFtpWrapper.o
cafe/util/HTTPUtil.o cafe/util/EncryptedFileHandler.o
cafe/util/RegistryNotSetException.o
cafe/util/CafeUtil.o cafe/util/NetUtil.o
-odebug/Compilation -Ldebug
-LC:/MesDocuments/_dev/CocoonWorkspace/Compilation/lib
An error from the external jar:
C:/MesDocuments/_dev/CocoonWorkspace/Compilation/org/apache/log4j/config/PropertyPrinter.java:113:
undefined reference to
`_ZN4java3awt9Component18firePropertyChangeEJvPNS_4lang6StringEff'
An error from one of my own class:
C:/MesDocuments/_dev/CocoonWorkspace/Compilation/cafe/AdCafeProperties.java:272:
undefined reference to `cafe::AdCafeException::class$'
Cheers,
Jerome
Jerome Benezech
jbenezech@yahoo.com