error C1189: #error : Qt requires a C++11 compiler and yours does not seem to be that.

Visual Studio2012生成C++程序,显示下图的错误。

复制过来是这样的:

错误 1 error C1189: #error : Qt requires a C++11 compiler and yours does not seem to be that.

没有查到解决方案。

求助!!请问这是什么问题呢?谢谢大家。

图片说明

vs2012只是部分支持c++11,用更新的编译器,比如vs2017看看

楼上说的对,更新一下 vs

同样问题求解:

fatal error C1189: #error:  "Qt requires a C++17 compiler, and a suitable value for __cplusplus. On MSVC, you must pass the /Zc:__cplusplus option to the compiler."

 

QMAKE_CXXFLAGS += -std=c++11