There's something i'm confused about.
Tom Tromey
tromey@redhat.com
Tue Mar 4 21:55:00 GMT 2003
>>>>> "Julia" == Julia Smith <julias@macrovision.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
More information about the Java
mailing list