Problem compiling apache libraries

Andrew Haley aph@redhat.com
Fri Feb 9 12:54:00 GMT 2007


Andrew Haley writes:
 > Mohsen Saboorian writes:
 > > By compiling jar files into object files, I'll no more need to add
 > > those jar files in classpath, right?
 > 
 > Right.
 > 
 > > Now, I want to compile the whole project into a single executable
 > > file. I use the following commang line:
 > > gcj --main=MainClass -findirect-dispatch apache-commons.o
 > > log4j-1.2.8.o swt-win32.o velocity-tools-generic-1.2.o velocity-1.4.o
 > > zekr.o
 > 
 > > where all the needed runtime jars added as .o file, but GCJ gives a
 > > lot of error messages complaining "undefined reference to
 > > XYZ::class$$'"
 > > e.g.
 > > swt-win32.jar:(.data+0x2f110): undefined reference to `_ZN3org7eclipse3swt8internal8Callback4bindEJiPS3_PN4java4lang6ObjectEPNS6_6StringESA_ibbi'
 > > 
 > 
 > This may indicate some sort of compiler bug. 
 > `_ZN3org7eclipse3swt8internal8Callback4bindEJiPS3_PN4java4lang6ObjectEPNS6_6StringESA_ibbi', 
 > which is actually
 > org.eclipse.swt.internal.Callback.bind(org.eclipse.swt.internal.Callback, java.lang.Object, java.lang.String, java.lang.String, int, boolean, boolean, int)int
 > should be resolved internally by swt-win32.jar.
Hold on, I just had another idea.
For SWT, you must use -fjni.
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /