linking problems with jar files
Prabhakar, Vijay (IT)
Vijay.Prabhakar@morganstanley.com
Wed Feb 2 17:06:00 GMT 2005
I'm having some trouble linking using gcj v3.2.3-42. Unfortunately, I
don't really have the option to upgrade to a more recent version right
now, but I'm willing to be that the solution would be the same -- I
think I'm not using the correct set of switches to the linker.
I have a couple of java source files which I have compiled to .class
files using the -C option. I've taken those class files and made a JAR
file out of them. When I try to link a program that needs those
classes, I'm having problems linking. I cannot seem to get GCJ to
recognize the classes or find them in the JAR file. I get errors of the
type:
: undefined reference to `Foo::printHelloWorld()'
I've tried using -Ifoo.jar as well as --classpath=./foo.jar, but neither
one seems to work. What's the correct switch to use when trying to link
with a JAR file? I can't really compile everything to object files
because eventually some of those JAR files will come from external
sources. Thanks!
-Vijay
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.
More information about the Java
mailing list