This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: There's something i'm confused about.
- From: Tom Tromey <tromey at redhat dot com>
- To: "Julia Smith" <julias at macrovision dot com>
- Cc: <java at gcc dot gnu dot org>
- Date: 04 Mar 2003 14:47:44 -0700
- Subject: Re: There's something i'm confused about.
- References: <0825777F1074924EB8338D68E48CC256198882@mail.macrovision.com>
- Reply-to: tromey at redhat dot com
>>>>> "Julia" == Julia Smith <julias at macrovision dot com> writes:
Julia> If I compile a .class or .java to a .o, how come ar cannot
Julia> accept the file generated?
No clue. What platform?
What command line and error message?
Julia> Why does ar (a gnu one at that) not take the default output of
Julia> gcc or any of its variants?
Presumably a bug. You'd have to report it to the binutils list.
Julia> I am still running into considerable problems linking. It seems
Julia> like .classes in .jars are not always properly located, so if I
Julia> compile like so:
Julia> gcj -classpath ./classes:jars/bcjars.jar:xalan.jar:<stdlib>
Julia> I *still* get numerous linker errors declaring that
Julia> <some-class-in-one-of-the-jars> is undefined.
If you compile a class, then all classes it requires must also be
compiled. When you link, all these classes must be visible to the
linker.
Julia> I cannot build .o's and link against them because of the ar
Julia> problem.
Julia> I would have too man .o's to link against directly on the
Julia> command line.
I think you can compile a bunch of .jar files to a single .o at once.
gcj -c -o foo.o *.jar
Then link as usual.
To really help we need more information. For instance we need the
exact command sequence you try and the results. The above example is
not sufficient -- for one thing it isn't a valid command (there's
nothing to compile).
Tom