There's something i'm confused about.
Erik Poupaert
erik.poupaert@chello.be
Tue Mar 4 21:45:00 GMT 2003
>>>>>> If I compile a .class or .java to a .o, how come ar cannot accept the
file generated?
>>>>>> Why does ar (a gnu one at that) not take the default output of gcc or
any of its variants?
I'm wondering if this is truly so? I use "ar" all the time, with gcj-, gcc-,
and even vc.net produced .o files; and it works, no sweat, both on minGW as
on linux. What options did you use with "ar" and what files were you trying
to join in an archive?
>>>>>> I *still* get numerous linker errors declaring that
<some-class-in-one-of-the-jars> is undefined.
Be careful with linking. "ld" traverses the libraries to link only one time
(I used to have this problem as well: lots of unresolved symbols). The
solution is to create linking groups to be traversed multiple times until
all symbols are resolved:
gcj -Xlinker --start-group ${arc1} ${arc2} -Xlinker --end-group -o
${outexe} --main=${mainclass}
The "-Xlinker --start-group ... --end-group" did the trick in my case.
More information about the Java
mailing list