Problem compiling apache libraries

Andrew Haley aph@redhat.com
Fri Feb 9 16:03:00 GMT 2007


Please don't top-post.
Mohsen Saboorian writes:
 > 
 > Using -fjni switch fixed almost 4/5 of those undefined reference
 > errors. Yet I have problems...
 > 
 > Main class is in a jar file called zekr.jar. I also compiled it into
 > zekr.o, so I assume there is no need to have -Izekr.jar (or any other
 > dependency jars, which are already available as .o) in --classpath.
 > Anyway, again compiling with this command line gives errors:
 > $gcj --main=ZekrMain -fjni -findirect -dispatch apache-commons.o
 > log4j-1.2.8.o swt-win32.o velocity-1.4.o velocity-tools-generic-1.2.o
 > zekr.o
You seem to be using a mailer that is breaking your lines in random
places. This makes it impossible to see what your command actually
was.
I'm guessing it was
 gcj --main=ZekrMain -fjni -findirect-dispatch \
apache-commons.o log4j-1.2.8.o swt-win32.o \
velocity-1.4.o velocity-tools-generic-1.2.o zekr.o
 > It gives many errors of the form:
 > velocity-tools-generic-1.2.o: In function
 > `ZN3org6apache8velocity5tools7generic12IteratorTool12internalWrapEJvPN4java4lang6ObjectE':
I'm guessing this was
_ZN3org6apache8velocity5tools7generic12IteratorTool12internalWrapEJvPN4java4lang6ObjectE
which is
org.apache.velocity.tools.generic.IteratorTool.internalWrap(java.lang.Object)void
 > .../velocity-tools-generic-1.2.jar:(.text+0x3aa9): undefined reference
 > to `org::apache::velocity::util::ArrayIterator::class$'
This looks to me like velocity-tools is compiled without -findirect-dispatch.
 > although org.apache.velocity.util.ArrayIterator is available in velocity-1.4.o.
 > Any idea?
Andrew.


More information about the Java mailing list

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