🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

cross-compilation?

Started by
4 comments, last by blanky 17 years, 7 months ago
Hey, does anybody know if it is possible to compile windows executables from within your linux OS? I want to make my games playable to my windows-using friends without having to setup a development environment on windows as well. Thanks!
Advertisement
I know that it's possible, although I have no experience actually cross-compiling.

Have a look here for some info: http://www.libsdl.org/extras/win32/cross/README.txt
1. Use wine to run windows executables, i.e. a windows compiler which will generate programs for windows.

2. Download the MinGW sources (MinGW is the port of GCC to windows) and cross-compile them with the build and host system being linux and the target system being windows. This will create a compiler running under linux, which produces windows programs.
Yes it is possible, however I see very little point in doing so, as you clearly have to have a windows box (or indeed, several) to test a Win32 build of your game.

So even if it's developed under Linux, you'll still need to do testing under Win32, or expect trouble.

As those Win32 boxes are required anyway, you may as well build natively.

Unless your build scripts are so stupid that they can't easily be ported to win32 :)

NB: I develop games under Linux and build win32 builds of them on Windows.

Mark
Quote: Original post by markr
Yes it is possible, however I see very little point in doing so, as you clearly have to have a windows box (or indeed, several) to test a Win32 build of your game.


It might just be easier or more feasible to run a single script to create a build for everything, including art, sound resources, and code on one machine rather than have two or three. If you only have one machine that you dual-boot with, it is kind of nice to be able to build everything at once instead of needing to reboot first.

Yes, you need to test, but if you have dedicated test machines, you probably would like to keep those clean from compilers/libraries/etc so that they mimic a real-life user's machine more accurately.

Sometimes it is just a matter of limited resources.
-------------------------GBGames' Blog: An Indie Game Developer's Somewhat Interesting ThoughtsStaff Reviewer for Game Tunnel
Since the above posters have already said everything I could've, let me just add that you might want to just run a Virtual Machine/Emulator like QEMU, VmWare, or something similar and run Windows on that.

This topic is closed to new replies.

Advertisement