This is an old revision of the document!
Setting up the build environment on Windows
Assuming Windows XP 32.
Stuff you'll need
A Subversion client
Doesn't really matter which one. Certified binaries of The Real McCoy are available at http://www.collab.net/downloads/subversion/ (command-line only) if you have an account (or are willing to register). There are other (non-certified) sources such as SlikSVN (http://www.sliksvn.com/en/download, command-line only) and TortoiseSVN (http://tortoisesvn.net/downloads, with Windows Explorer integration, which is really neat).
MSYS
Download the latest version of the MSYS Base System from http://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/ and run it. If it asks, tell it you don't have MinGW installed.
Now that MSYS is installed, you can start the “MSYS (rxvt)” shortcut it installed, and it'll be almost like you were home on the Unix farm.
MinGW
As of November 2009, the automated installer is useless; it installs gcc 3 instead of 4. You'll have to install MinGW manually using MSYS.
The following command will create and mount a directory for MinGW:
mount C:/MinGW /mingw
Next, download the packages you will need.
Then extract everything:
$ for f in *tar.gz ; do tar zxvf $f -C /mingw ; done $ for f in *tar.lzma ; do tar --lzma -xvf $f -C /mingw ; done
Let's see if our C compiler works:
$ cat >hello.c #include <stdio.h> int main(void) { printf("Hello, C world!\n"); return 0; } ^D $ gcc -o hello hello.c $ ./hello.exe Hello, C world!
And C++:
$ cat >hello.cc #include <iostream> int main() { std::cout << "Hello, C++ world!" << std::endl; return 0; } ^D $ g++ -o hello hello.cc $ ./hello.exe Hello, C++ world!
And Fortran 90:
$ cat >hello.f90 PROGRAM HelloWorld PRINT *, "Hello, Fortran world!" END PROGRAM HelloWorld ^D $ gfortran -o hello hello.f90 $ ./hello.exe Hello, Fortran world!
WiX
Microsoft's tool for creating installation packages: http://sourceforge.net/projects/wix/files/. Ironically, it does not come with its own installer.