This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem compiling apache libraries


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]