This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libgcj/2737: User-defined thrown exception is not found
- To: jddahl <jddahl at micron dot com>
- Subject: Re: libgcj/2737: User-defined thrown exception is not found
- From: Tom Tromey <tromey at redhat dot com>
- Date: 21 Jun 2001 10:19:30 -0600
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, java-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- References: <3607D767B8E1D311A24F0008C7590A960717384E@ntexchange07.micron.com>
- Reply-To: tromey at redhat dot com
>>>>> ">" == jddahl <jddahl@micron.com> writes:
>> When I execute:
>> gcj -o test Test.o /u/jddahl/java/objects_solaris/test/core/LotNumber.o
>> /u/jddahl/java/objects_solaris/test/core/InitializationException.o
How did you get Test.o? I'm guessing you made it by compiling both of
the other .java files at once.
Don't do that.
Here is how to get what you want:
gcj -c -I/u/jddahl/java/sources --encoding=UTF-8 \
-MD -o /u/jddahl/java/objects_solaris/test/core/LotNumber.o \
/u/jddahl/java/sources/test/core/LotNumber.java
gcj -c -I/u/jddahl/java/sources --encoding=UTF-8 \
-MD -o /u/jddahl/java/objects_solaris/test/core/InitializationException.o \
/u/jddahl/java/sources/test/core/InitializationException.java
gcj --main=test.core.LotNumber -o /u/jddahl/java/objects_solaris/LotNumber \
/u/jddahl/java/objects_solaris/test/core/*.o
This will compile each .java file separately and then link them
together. It assumes that `main' is in test.core.LotNumber. Don't
forget to set LD_LIBRARY_PATH when running the program.
I'm going to close this PR. I don't think there is a bug here.
Tom