This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Newbie : How to compile
- To: Martín Pérez Mariñán <perez_martin at terra dot es>
- Subject: Re: Newbie : How to compile
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Sat, 23 Jun 2001 08:07:27 -0700 (PDT)
- Cc: java at gcc dot gnu dot org
- References: <993325004.16831.1.camel@localhost.localdomain>
- Reply-To: apbianco at cygnus dot com
Martín Pérez Mariñán writes:
> When I try to compile this file, it seems that it doesn't find the
> NoTerminal.o and Simbolo.o files.
It's actually looking for the Java files themselves. Make sure the
compiler knows where to look for source files. For example, I could
reproduce an error similar to the one you saw by doing:
apbianco@venonat[~/tmp/O]: cat ../B.java
class B {A foo(){return null;}}
apbianco@venonat[~/tmp/O]: cat ../A.java
class A {}
apbianco@venonat[~/tmp/O]: gcj -c ../A.java
apbianco@venonat[~/tmp/O]: gcj -c ../B.java
../B.java:1: Type `A' not found in the declaration of the return type of method `foo'.
class B {A foo(){return null;}}
^
1 error
apbianco@venonat[~/tmp/O]: CLASSPATH="/home/apbianco/tmp" gcj -c ../B.java
As you can see, setting CLASSPATH properly fixes my problem.
./A