This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libgcj/2737: User-defined thrown exception is not found


>>>>> ">" == 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]