Re: GCJ on Linux

Jonathan Wakely <[email protected]>
Newsgroups gmane.comp.gcc.help,gmane.comp.gcc.java.devel
Message-ID <CAH6eHdSDtXh=Scfdm3YsjUYb5su2Eew_tz8ZHD+XSh+TMX+ddw@mail.gmail.com>
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.  IS there a 32 bit compile switch, and does anyone know it?

Assuming you're talking about x86, it's -m32, as documented in the GCC manual.

Maybe it would be easier to just run normal Java code on Windows,
instead of compiling to native code with gcj.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.