public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GCJ - undefined reference
@ 2007-03-31  9:41 Jerome Benezech
  2007-03-31 10:27 ` Andrew Haley
  0 siblings, 1 reply; 2+ messages in thread
From: Jerome Benezech @ 2007-03-31  9:41 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GCJ - undefined reference
  2007-03-31  9:41 GCJ - undefined reference Jerome Benezech
@ 2007-03-31 10:27 ` Andrew Haley
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Haley @ 2007-03-31 10:27 UTC (permalink / raw)
  To: Jerome Benezech; +Cc: gcc-help

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-31  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-31  9:41 GCJ - undefined reference Jerome Benezech
2007-03-31 10:27 ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).