Loading...

java@gcc.gnu.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: GCJ on Linux Jonathan Wakely Tue Feb 21 04:00:19 2012

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.