This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Getting started with GCJ
>>>>> "Michael" == Michael J McGonagle <fndsnd@earthlink.net> writes:
Michael> Anyway, is there a REALLY good reason to upgrade? Mandrake
Michael> uses version 2.96 of gcc, and I had heard that this version
Michael> of the compiler is not the best.
I don't know if you mean you heard that 2.96 was not the best or that
3.0 was not the best. I think people say this about every gcc
release, so it could be either one :-)
For gcj, newer is always better. gcj is still under active
development. It is definitely *not* feature complete. Each new
release tends to be vastly improved (imho, of course) from the
previous one. We are adding features and classes and fixing bugs all
the time.
Michael> So what it comes down to, is how do you compile two classes
Michael> that are mutually dependant on each other?
If you're compiling from .java -> .o, just compile each individually.
gcj will do the right thing:
gcj -c pkg/foo/bar.java
gcj -c pkg/foo/baz.java
If you're compiling from .class -> .o, put both on the command line at
once:
gcj -C pkg/foo/bar.java pkg/foo/baz.java
I could probably answer better if you could show what went wrong when
you tried the above.
Michael> Also, does anyone know of a simple tool that can handle the
Michael> compilation of a complex project? Do most people use
Michael> Makefile's?
We use make but it is really not sufficient. gcj can produce
dependencies in a form make understands. See the `-M' family of
options in the documentation.
Some people like to use Ant for Java. I've never investigated it.
Tom