How to install MinGW, MSYS and Eclipse on windows
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.4.x) from trolltech:
- MinGW (GCC 4.4.0) (MinGW-gcc440_1.zip)
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-gcc440_1.zip to C:\ (You should have a folder C:\mingw\bin after unpacking)
- Add C:\mingw\bin to your PATH system variables (environment variables).
- 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 finish
- 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
- http://www.blogistan.co.uk/qt/2009/12/where_get_mingw_qt_46.php
- http://max.berger.name/howto/cdt/ar01s03.jsp
- http://wiki.openttd.org/Compiling_on_MinGW
- http://trac.enlightenment.org/e/wiki/EFLWindowsXP
- http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite
- http://www.mingw.org/wiki/MSYS


Recent Comments