Forward declaration of classes needed when using GCJ?

Andrew Haley aph@redhat.com
Fri Feb 15 19:51:00 GMT 2008


Andrew W wrote:

> If you then try linking against jar files using --classpath= you're back 
> to square 1.
> 
> Taking the above example (the 1st one) if you copy any  .JAR file to 
> /path/to/project/
> 
> then do
> 
> gcj --main=net.mydomain.core.ClassA ./net/mydomain/core/ClassA.java 
> ./net/mydomain/core/ClassB.java --classpath='./lo4j-1.2.8.jar'
> 
> you get the same error about not recognising ClassB.
> 
> Even appending the current dir onto the end of the classpath doesnt 
> solve it.
> 
> Any ideas?

Last time, two of us tried to duplicate your problem and failed.  It seems that
you didn't really describe what your problem actually was, so it worked for
us but not for you.  Could you please produce a test case, in a tarfile that
we can upack, and the exact command that you want us to try?  That way, we'll
at least be doing the same thing.  Also, we need to know which version of gcj you
used.

Andrew.



More information about the Gcc-help mailing list