GCJ 3.2 for Win32: Updated Snapshot
Jeff Sturm
jsturm@one-point.com
Thu Dec 12 20:55:00 GMT 2002
On 12 Dec 2002, Tom Tromey wrote:
> Jeff> That is what -fno-assume-compiled was for, as I understand it.
> Jeff> However it doesn't work at this time.
>> I think it never worked.
I looked at the code. I think it can be useful; see the example below.
Would you be interested in patches to make it work?
[jsturm@suzy tmp]$ cat Foo.java
public class Foo extends Bar {
public Foo() {
System.out.println("Foo");
}
public static void main(String[] args) {
new Foo();
}
}
[jsturm@suzy tmp]$ cat Bar.java
public class Bar {
public Bar() {
System.out.println("Bar");
}
}
[jsturm@suzy tmp]$ gcj Foo.java --main=Foo -o foo
/tmp/ccCkQTOS.o(.text+0x1a): In function `Foo::Foo[in-charge]()':
: undefined reference to `Bar::Bar[in-charge]()'
/tmp/ccCkQTOS.o(.data+0x90): undefined reference to `Bar::class$'
collect2: ld returned 1 exit status
[jsturm@suzy tmp]$ gcj Foo.java -fno-assume-compiled --main=Foo -o foo
[jsturm@suzy tmp]$ ./foo
Exception in thread "main" java.lang.ClassNotFoundException: Bar
[jsturm@suzy tmp]$ gcj -C Bar.java
[jsturm@suzy tmp]$ ./foo
Bar
Foo
More information about the Java
mailing list