Re: Forward declaration of classes needed when using GCJ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK I've solved the problem when you've just got the two simple classes A & B. It seems is obscurely fussy about the current working directory.

It insists the current directory is the root of the project and you specify the .java files as a sub path below that it will NOT allow you to have the package dir containing the .java files as the current directory. i.e

cd /path/to/project

gcj --main=net.mydomain.core.ClassA ./net/mydomain/core/ClassA.java ./net/mydomain/core/ClassB.java

WILL work

cd /path/to/project/net/mydomain/core/

gcj --main=net.mydomain.core.ClassA ./ClassA.java ./ClassB.java

will NOT

Anyway.

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?

Regards
Andrew




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux