I am trying to get MinGW (version 4.7.2) while working with Visual Studio 2010 to use some of the new features in C ++ 11 (unfortunately, I'm still on WindowsXP and can't use Visual Studio 2012). To start, I created a project with: File β New Project β Visual C ++ β General β Makefile-Project
General: Build Command Line: mingw32-make.exe Rebuild All Command Line: mingw32-make.exe rebuild all Clean Command Line: mingw32-make.exe clean all IntelliSense: Include Search Path: C:\MinGW\lib\gcc\mingw32\4.7.2\include\c++;C:\MinGW\include; Assembly Search Path: C:\MinGW\lib\gcc\mingw32\4.7.2;C:\MinGW\lib; Additional Arguments: -std=c++11
And I created a make file with content:
all: g++ -std=c++11 -pthread -o Makefile_Test.exe main.cpp
It compiles just fine, but almost all the wavy reds are underlined in the Visual Studios editor. i.e.
std::vector<std::thread> threads;
std::vector β 'Error: the std namespace does not have a member vector
std::thread β 'Error: the std namespace does not have a member stream
flat std::cout << "";
std::cout β 'Error: the std namespace does not have a cout member'
But I, of course, included the corresponding headers: and Visual Studio can even find them (place the cursor in #include β Ctrl + Shift + G, it will open the header). My MinGw folder looks like this:
+ MinGW |- bin |- doc |- include |+ lib |- gettext |+ gcc |+ mingw32 |+ 4.7.2 |- debug |+ include |- c++ |... |- include-fixed |- install-tools |- libexec |- mingw32 |- msys |- share |- var
I also tried to delete the sdf file several times and let Visual Studio rebuild it from scratch - but all these errors appeared again.
Any ideas what I'm doing wrong here?