Page 1 of 1

Is there a way to compile Windows daily on Linux?

PostPosted: Sun Dec 02, 2012 22:42
by yohoho
As the title asks, is there a way to compile the daily unstable for Windows while on Linux? If so could someone give me the instructions? Thank you.

PostPosted: Sun Dec 02, 2012 23:48
by Leroy
The only way is on Wine or VM

PostPosted: Mon Dec 03, 2012 00:37
by Roflo
In theory, you should be able to Cross-Compile.
But it's been ages since I last did that, so I don't think I remember enough to walk you through it.

http://en.wikipedia.org/wiki/Cross_compiler


A quick search returned these 2 results. I gave them a quick glance and they sound right:
http://stackoverflow.com/questions/182408/manual-for-cross-compile-a-c-application-from-linux-to-windows
http://forums.codeblocks.org/index.php?topic=3343.0

And in case you get stuck...
...when I last did it, I downloaded some extras from DJGPP:
http://www.delorie.com/djgpp/

From Delori'es install page (Using Zip-picker):
Using DJGPP as a unix-to-dos cross compiler is tricky. You'll need to get, build, and install binutils and gcc with ./configure --target=i586-pc-msdosdjgpp (install binutils before configuring gcc - gcc needs the cross-assembler). You may need this patch.

djcrx comes with sources for stubify, which you'll have to build and install manually.

So that's the short version:
1. You have to build binutils and gcc (for your target).
1.1. You might need something like the stubify (to get proper W32 binaries).
2. When you have the above, you'll need to specify a --target when compiling.
3. Have fun compiling just about everything (libraries/dependencies).

And do let us know if you managed to do it.

PostPosted: Mon Dec 03, 2012 03:46
by kaeza
Leroy wrote:The only way is on Wine or VM

False. You can also use the mingw32-binutils package (available from your favorite package manager or from the usual MinGW sites).

yohoho, take a look at the CMake docs in particular to the CMAKE_TOOLCHAIN_FILE variable. You should get all the info you need there; if not, just post again. Thanks.

PostPosted: Mon Dec 03, 2012 16:33
by sfan5