Compiling on win32 for free

I installed Windows XP over the weekend so I could get a win32 version of C2 compiled and running. I couldn’t find my copy of Visual Studio 2005 Professional Enterprise Edition (or whatever the hell it’s called) so I opted to install Microsoft’s free compiler. I discovered that Microsoft offers Express (free) versions of it’s Visual product line complete with IDE. The process to get everything up and ready to compile win32 apps is a little involved but entirely worth it.

1) Install Visual C++ Express
2) Install Visual C++ Express SP1
3) Install the Windows Platform SDK (yes, the Windows Server 2003 one)
4) Configure Visual C++ Express to use the Platform SDK

On linux C2 is built using CMake so I wanted to use CMake, if possible, to build on win32. As it turns out, using CMake on win32 is painless. I installed the CMake windows installer and ran CMake on C2 expecting nothing to work. It quickly found Visual C++ Express and dumped out a few Visual C++ project files. I could edit and compile the project from the Visual C++ IDE. The CMake files were even added as dependencies so project files would be regenerated when a CMake file was modified. After a few hours of fixing up platform specific issues I had a win32 version of C2 running without problems.

I don’t know exactly what is missing from the Express version of Visual C++ but it does everything I need it for.  So far, I’m very pleased.  The best part is it’s completely free.

Leave a Reply