You will first want to install the MinGW package, then MSYS. When installing MSYS, you want to answer 'y' to the first question, and then give 'y' to the next question. Then you will want to give the directory name to your MinGW installation using the Unix-style directory separator (forward slash, instead of the backslash used by Windows and DOS). If you used the default directory when installing MinGW, then you will want to enter c:/MinGW. When installation is complete, you can run and compile your programs just as you would on any Unix system using GCC, including Mac OS X-- and you didn't have to spend over $100 to do it!
A thing to remember: The command prompt has some bugs in MSYS, so, if you want your console programs to run correctly, you should run them in the normal command shell (COMMAND.COM or CMD.EXE) for them to work properly.