我刚刚安装了 QtSDK,但在尝试使用正则表达式函数时遇到了一些问题。
编译我的程序时出现此错误:
#error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This supports currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
我试图在我的项目文件中添加这个:
QMAKE_CXXFLAGS += -std=c++0x
和
QMAKE_CXXFLAGS += -std=gnu++0x
但我得到更多其他错误。On Code::Blocks 正则表达式工作正常,并且也在使用 MinGW。那么如何在 QtSDK 上使用 C++11 工具呢?