467,076 Members | 945 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,076 developers. It's quick & easy.

cross compilation

Hi everyone,

I would like to know a way to produce a .EXE file compiling with gcc
from within a Linux machine.

Is it just a flag question or do I need any specific library?

Thank you in advance for your kind reply.
Jul 3 '08 #1
  • viewed: 1490
Share:
3 Replies
cervello_in_vacanza wrote:
Hi everyone,

I would like to know a way to produce a .EXE file compiling with gcc
from within a Linux machine.

Is it just a flag question or do I need any specific library?

Thank you in advance for your kind reply.
No, you need to compile gcc as a cross compiler. It's not a easy task
and this is not the group to ask help with it. Try gnu.gcc.help or
perhaps a Linux newsgroup. IIRC there are a fair number of tutorials
and howtos on the Net on this subject. Use Google to find them.

Jul 3 '08 #2
On 3 Jul 2008 at 19:23, santosh wrote:
cervello_in_vacanza wrote:
>I would like to know a way to produce a .EXE file compiling with gcc
from within a Linux machine.

No, you need to compile gcc as a cross compiler. It's not a easy task.
You also need to compile the binutils (as, ld etc.) for cross compiling.

It's quite possible that the OP's Linux distribution will package tools
for cross-compilation, which should make things much easier. For
example, Debian has mingw32, mingw32-binutils and mingw32-runtime
packages, so that "those who still really need to can now build windows
executables from the comfort of Debian."

Jul 3 '08 #3
Antoninus Twink wrote:

It's quite possible that the OP's Linux distribution will package tools
for cross-compilation, which should make things much easier. For
example, Debian has mingw32, mingw32-binutils and mingw32-runtime
packages, so that "those who still really need to can now build windows
executables from the comfort of Debian."
I run a Debian. That's what I was wishing to hear.
I will apt-get them as soon as I can.
thank you.
Jul 3 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by darkhack@gmail.com | last post: by
1 post views Thread by Han-Wen Nienhuys | last post: by
1 post views Thread by ac.c.2k7@gmail.com | last post: by
3 posts views Thread by Squat'n Dive | last post: by
1 post views Thread by Roumen Petrov | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.