Trying to build from a jar with gcj... many "undefined reference" issues
Anthony Green
green@redhat.com
Thu Sep 22 04:00:00 GMT 2005
On Wed, 2005年09月21日 at 16:54 -0700, m h wrote:
> /tmp/cc9PdYTE.o(.data+0xb7e4): undefined reference to
> `org::apache::xmlrpc::WebServer::class$'
> collect2: ld returned 1 exit status
>> I'm assumming this is just a newbie error. I've searched through the
> mailing list and google and have tried various other switches, but the
> above command appears to be the farthest that I've gotten. All of the
> "undefined reference" classes appear to be in the jars in the lib
> directory.
It's not enough to simply place those jars in your classpath. The
linker is trying to find natively compiled versions of those libraries
with no success.
You need to link your code against natively compiled versions of all of
the missing code, or switch to a much newer version of gcj and use the
new ABI (-findirect-dispatch) mechanism to build your code.
Probably the simplest approach would be to develop on Fedora Core 4,
which should come with most of those things in both bytecode and native
library form already. What platform are you currently on?
AG
More information about the Java
mailing list