This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

newbie: compiling/linking


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. 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]