user69514
user69514

Reputation: 27629

How to compile a .cpp file into a Windows executable (.exe) file in Linux

I make this program in C++ using Code::Blocks on Ubuntu. I need to turn it into a Windows executable binary (.exe file), but I don't know how to do this. Is it possible?

Upvotes: 3

Views: 7348

Answers (4)

Felix
Felix

Reputation: 142

If you meant, compiling an executable for Windows on Linux you might find some pointers on how to do that here.

Upvotes: 4

greyfade
greyfade

Reputation: 25647

Both the MinGW32 distribution of GCC and Wine should be available for your distribution.

MinGW has instructions and winegcc wraps a similar compiler that comes with the Wine distribution.

I've used both to compile both applications and libraries for Windows.

Upvotes: 3

Kirill V. Lyadvinsky
Kirill V. Lyadvinsky

Reputation: 99585

You could read here on how to compile wxWidget applications on Linux for Windows using Code::Blocks.

Upvotes: 1

Daniel
Daniel

Reputation: 870

This is a fairly unusual question. What you're asking is that you want to develop on Ubuntu, but the target platform is Windows?

My guess is that you have an assignment to turn in. My belief is that you should go to a lab and compile it and make sure it's working.

However, doing some research, you should try mingw at http://www.mingw.org/

Upvotes: 0

Related Questions