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: Trying to build from a jar with gcj... many "undefinedreference" issues


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



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