Notes

You could use the ‘official’ MinGW however, the current/stable release (5.1.6) contains an old compiler (GCC 3.x) and old debugger (5.2.1). In this howto I will use a more up to date package.

Requirements

Up to date version of MinGW (GCC 4.x) from from nuwen.net:

Minimal system / Devtools

  • MSYS (current version: 1.0.11) (MSYS-1.0.11.exe)
  • MSYS DTK (current version: 1.0.1) (msysDTK-1.0.1.exe)
  • Java Development Kit (JDK, current version: JDK 6 Update 17)
  • Eclipse (current version: Eclipse IDE for C/C++ Developers (79 MB))

Installing the compiler and debugger

  • Unzip mingw-5.0.zip to C:\ (You should have a folder C:\MinGW\bin after unpacking)
  • Delete make.exe in C:\MinGW\bin
  • Add C:\MinGW\bin to your PATH system variables (environment variables).
  • Unpack gdb-6.8-mingw-3.tar.bz2 to your MinGW dir
  • Done.

Install the shell

  • Open up the installer (MSYS-1.0.11.exe).
  • Keep the default folder (C:\msys\1.0).
  • In the command line box answer yes to continue with the post install.
  • Answer yes on the second question (MingGW installed)
  • When it ask for the path, type: C:/MinGW
  • Hit any key to continue
  • Untick both boxes and click on finis
  • Add C:\msys\1.0\bin to your PATH system variables (environment variables).
  • Install msysDTK-1.0.1.exe
  • Use the same folder as MSYS
  • Done.

Install the IDE

  • Install the JDK with the default settings
  • To install eclipse, unzip the content to C:\Program Files\eclipse
  • Create a shortcut to Eclipse.exe on the desktop
  • Done.

Creating a HelloWorld Project

  • Open up Eclipse
  • File > New > Project
  • Select C/C++ > C++ Project
  • Click on Next
  • Change project name to “Hello World”
  • Click on Hello World C++ Project (Toolchain should show MinGW GCC)
  • Click Finish
  • Run > Run (or press CTRL-F11)
  • The Console (at the bottom) should show !!!Hello World!!!
  • You’re all set.

Additional resources