newbie: compiling/linking

Dhek Bhun Kho bhun@chello.nl
Sat Dec 14 06:05:00 GMT 2002


Hi 
Okay, I've got like a probably very stupid question, but I can't figure
it out by reading the gcc-manuals and googling: 
If I compile ant using this (in the directory with all the libs): 
gcj --main=org.apache.tools.ant.Main -o ant lib-org-apache-tools.so
lib-org-apache-bcel.so lib-javax-xml-transform.so
lib-javax-xml-parsers.so lib-org-apache-regexp.so 
lib-org-apache-xerces.so lib-org-w3c-dom.so lib-org-apache-xml.so
lib-org-apache-xalan.so lib-org-apache-xpath.so lib-java_cup.so 
Then I will get the duplicate class problem. 
If I use this (int the same lib directory): 
gcj -o ant -L. -l-javax-xml-parsers --main=org.apache.tools.ant.Main
-l-org-apache-tools -l-org-apache-bcel -l-javax-xml-transform
-l-org-apache-regexp
Then no problem occurs, and I can run ant (Just still some problem with
the dateformat thing,gives me a huge stacktrace, it's fixable by hacking
the code, but there must be some other way). Can somebody please explain
the difference between the two? I really don't understand this. I'd like
to know the details behind this instead of using the second form just
because it works. 
I'd very much appreciate some help on this. 


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /