2

Is it possible to compile a Win32 program on a Linux computer without the use of an emulator or Wine or anything?

1

3 Answers 3

2

Yes.

For more infomation, google "gcc crosscompile win32".

The first hit is Building a Cross compiler for Windows on Linux

Sign up to request clarification or add additional context in comments.

2 Comments

Clearly we're interested in the same tags ;)
@heinrich5991: Broken link has been repaired (the original advice of searching for "gcc crosscompile win32" worked wonderfully to find the new URL)
0

Yes, sure it is possible. You have to use a cross-compiler toolchain. You can find a good gcc cross toolchain both for 32 and 64 bit targets at the following address http://www.drangon.org/mingw/

Comments

-1

Yes it is possible, C++ was designed to compile the same code on multiple platforms, however take notice: if you have windows specific system calls/commands in your program they won't work on Linux and vice-versa.

2 Comments

This doesn't even come close to answering the question.
It wasn't meant to, the people that answered before me gave the answer. I just wanted to remark to the OP that if he has system calls he should convert those manually, it wouldn't compile otherwise on a different platform. Or maybe I just misunderstood the question. Anyway, I just hope my comment helped somehow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.