From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21869 invoked by alias); 21 Feb 2012 11:25:12 -0000 Received: (qmail 21849 invoked by uid 22791); 21 Feb 2012 11:25:11 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_GC X-Spam-Check-By: sourceware.org Received: from mail-lpp01m010-f47.google.com (HELO mail-lpp01m010-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 21 Feb 2012 11:24:59 +0000 Received: by lahc1 with SMTP id c1so7930751lah.20 for ; Tue, 21 Feb 2012 03:24:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.48.65 with SMTP id j1mr7471283lbn.76.1329823497467; Tue, 21 Feb 2012 03:24:57 -0800 (PST) Received: by 10.112.52.40 with HTTP; Tue, 21 Feb 2012 03:24:57 -0800 (PST) In-Reply-To: References: Date: Tue, 21 Feb 2012 11:25:00 -0000 Message-ID: Subject: Re: GCJ on Linux From: Jonathan Wakely To: Me Myself and I Cc: java@gcc.gnu.org, gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2012-02/txt/msg00022.txt.bz2 On 21 February 2012 10:30, Me Myself and I wrote: > > Does gcj on Linux give the option to compile for windows? No. GNU/Linux and Windows have entirely different, incompatible runtime environments, you can't just say "I want this to run on Windows" and expect a GNU/Linux compiler to link to the Windows runtime. You'd need a cross-compiler targeting Windows, as described at rmathew's document that you've been posting, which would need copies of all the Windows runtime files (i.e. the binaries for "mingw-runtime" and "w32api") > Can someone tell me what the appropriate windows switch is? > > I have a 64 bit Linux OS install.=A0 IS there a 32 bit compile switch, an= d does anyone know it? Assuming you're talking about x86, it's -m32, as documented in the GCC manu= al. Maybe it would be easier to just run normal Java code on Windows, instead of compiling to native code with gcj.