With Eclipse, MinGW integrates seamlessly. Make sure you have the following added to your environmental path:
YourPath\MinGW\include;
YourPath\MinGW\bin;
When choosing to make a new C++ project, I personally prefer an Empty Project
under Project type:
and ensure that the MinGW GCC
is listed under Toolchains:
. Choose both of those, give the project a name, and select Finish
. IF MinGW is not under Toolchains:
then it is not set properly in your environment or you need to restart your machine.
Right-Click
the project name to add a new Source-Folder
(I typically call 'src') and then Right-Click
on the new source folder to add a Source File
and subsequently write your hello world code. So long as CDT is set to Internal Builder
and you have made no changes otherwise to the Eclipse project settings, your program should build properly and you should observe in the console:
12:27:48 **** Rebuild of configuration Debug for project Demo ****
Info: Internal Builder is used for build
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\main.o" "..\\src\\main.cpp"
g++ -o Demo.exe "src\\main.o"
12:27:50 Build Finished (took 1s.262ms)
If you want to enable c++11 within Eclipse/MinGW, just refer to the answer contained in Eclipse CDT C++11/C++0x support