I am doing a cross-platform C (not ++) game with both linux (main) and windows (alternate) binaries. Until now I used devcpp to compile in windows, but I have trouble getting some libraries to work right, and I heard it is possible to compile a windows binary from withing Linux. However, I don't know where to get started. The game uses a few libraries (GLEW, GL, SDL, SDL_mixer, SDL_image and Lua 5.1) that would clutter the distribution directory though, so is it possible to make a static binary with that method?
Asked
Active
Viewed 4,213 times
1
-
What is the game? Also I use ubuntu linux as my primary OS so I'm happy to hear this, but wouldn't it be prudent to design primarily for windows due to the vastly larger userbase? – Jiaaro Nov 09 '09 at 18:51
-
Take a look at the [Mingw](http://www.mingw.org/wiki/LinuxCrossMinGW) compiler. – Jorge Israel Peña Nov 09 '09 at 18:49
-
Looks like this is what I need. Can it build static binaries? – kagaminelen Nov 09 '09 at 19:57
-
Yes it can. Ubuntu keeps mingw in their repos too. – Prof. Falken Nov 10 '09 at 09:35
-
Already solved in https://stackoverflow.com/questions/2033997/how-to-compile-for-windows-on-linux-with-gcc-g – Denis Sablukov Dec 27 '18 at 09:13
-
1Does this answer your question? [How to compile for Windows on Linux with gcc/g++?](https://stackoverflow.com/questions/2033997/how-to-compile-for-windows-on-linux-with-gcc-g) – PiCTo Apr 30 '20 at 13:02