Question

Is there any way I can cross-compile C/C++ code for Windows (XP, Vista, Win7), ideally in 64-bit as well as 32-bit (for Vista and Win7), from a Solaris or OpenSolaris setup? My codebase is already cross-platform, I would like to cross-compile it (generate windows DLLs and EXEs) from Solaris or Linux as part of an automated process.

I would like to use the GCC suite, and would rather not need to use the Cygwin DLLs, if possible.

If it is possible, which tools would I need in my Solaris environment? How would I go about compiling/linking an entire project?

If this is not possible in Solaris, how should I proceed from Linux, considering I would like 32- and 64-bit binaries for all of the versions of Windows I have mentioned?

Thanks in advance for any help!

Was it helpful?

Solution

I'm not sure if you want cross-compilation (creation of Windows EXE files on the the Solaris box) or cross-platform (code that compile on Solaris or Windows). The latter is easier, and to do it you should start by installing the MinGW version of the GCC compiler on your Windows box.

OTHER TIPS

There is no 64-bit cross-compiler for Windows, you have to compile it using MSVC compiler :(

Er, why not just automate your build process by performing a remote build process? It's what we do - we have CruiseControl.NET on a Windows box which performs remote builds on Linux and Solaris via sshexec. I'm sure it would be possible the other way round.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top