link error: undefined reference
Andrew Haley
aph@redhat.com
Fri Apr 2 08:47:00 GMT 2010
On 01/04/10 21:07, Keith wrote:
> Thank you very much. I feel like an idiot. Obviously I've been away from
> gcc too long and forgot to keep my compile flags consistent.
>> Just FYI, compiling under Windows XP, SP3, using gcj 4.4.0, mingw, and msys
>> When I compile with -O0 -m32 -fjni -findirect-dispatch
> using gcj 4.4.0, I get
> gcj: unrecognized option '-s-bc-abi'
> for some files. It seems to do no harm.
It's just complaining that indirect-dispatch makes no sense when
compiling .java to .class. It doesn't matter.
> $ cat Test.java
> class Test {
> public static void main(String[] args)
> {
> System.out.println("Sample message");
> }
> }
>> $ sh -x make-test.sh
> + C_FLAGS='-O0 -m32 -findirect-dispatch'
> + gcj -O0 -m32 -findirect-dispatch -C Test.java
> gcj.exe: unrecognized option '-s-bc-abi'
> + gcj -O0 -m32 -findirect-dispatch -o Test.exe Test.class --main=Test
> -Wl,--enable-auto-import
>> $ ./Test.exe
> Simple message
>>> $ sh -x make-test.sh
> + C_FLAGS='-O0 -m32'
> + gcj -O0 -m32 -C Test.java
> + gcj -O0 -m32 -o Test.exe Test.class --main=Test -Wl,--enable-auto-import
>> $ ./Test.exe
>> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
Sorry, dunno. It should work, but I don't have a Windows system.
Did you run the gcj test suite?
Andrew.
More information about the Java
mailing list