This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCJ on Linux


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]