我想在Windows(Qt Creator 2.0.1)下使用Qt Creator中的新C++ 0x功能。C++ 0x与Qt Creator
我阅读了线程Configuring the GCC compiler switches in Qt, Qt Creator, and QMake并将QMAKE_CXXFLAGS += -std=c++0x
添加到.pro文件。
它之后Qt Creator中给了我这个简单的代码很奇怪的错误:
#include <memory>
int main()
{
}
编译器错误:
'::的swprintf' 尚未声明
“:: vswprintf'还没有宣布
我试着编译我的代码fr om命令行命令g++ test.cpp --std=c++0x
并得到相同的错误。
那么Qt MinGW编译器有什么问题?是否可以在Qt Creator中使用C++ 0x功能?
重复问题:http://stackoverflow.com/questions/4713713/include-iostream-with-std-c0x-is-broken。你所要做的就是在库头文件中注释`using :: swprintf;`和`using :: vswprintf;` - 查看ssmir答案中提到的补丁。 – TonyK 2011-02-15 12:47:37