From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6556 invoked by alias); 1 Apr 2010 20:08:14 -0000 Received: (qmail 6530 invoked by uid 22791); 1 Apr 2010 20:08:12 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,TW_FJ,TW_GC X-Spam-Check-By: sourceware.org Received: from mpls-qmqp-01.inet.qwest.net (HELO mpls-qmqp-01.inet.qwest.net) (63.231.195.112) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Apr 2010 20:08:08 +0000 Received: from [127.0.0.1] (unknown [70.58.238.194]) by mpls-qmqp-01.inet.qwest.net (Postfix) with ESMTP id 97D351A9882; Thu, 1 Apr 2010 20:08:04 +0000 (UTC) Message-ID: <4BB4FD0A.3030105@rhsdplanning.com> Date: Thu, 01 Apr 2010 20:08:00 -0000 From: Keith User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Andrew Haley CC: java@gcc.gnu.org Subject: Re: link error: undefined reference References: <4BABA6A1.4020404@rhsdplanning.com> <4BACE60D.9080103@rhsdplanning.com> <17c6771e1003260954q21babf04v1f4f22139c692d94@mail.gmail.com> <4BB24285.40204@rhsdplanning.com> <4BB2FDDB.4000405@redhat.com> In-Reply-To: <4BB2FDDB.4000405@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg00000.txt.bz2 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. $ 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. Andrew Haley wrote: > On 30/03/10 19:27, Keith wrote: > >> Environment is Windows XP, gcj 4.4.0, compiling under MSYS >> The final error I have is: >> >> C:\DOCUME~1\Keith\LOCALS~1\Temp\ccXVrvPx.o:cc8hZGFd.i:(.text+0x29): >> undefined reference to `com::performanceplanningsystem::ui::PPS::class$' >> collect2: ld returned 1 exit status >> > > This is because you're mixing -findirect-dispatch and > -fno-indirect-dispatch, which doesn't work. Compile the executable > with -findirect-dispatch too. > > Andrew. > > >