Qt中添加编译选项
在Qt 4.8.3的交叉编译环境中添加了c++标准库中的头文件 #include <thread> 后报下面错误:
/home/os/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/arm-linux-gnueabihf/include/c++/4.7.3/bits/c++0x_warning.h:32:
error
: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
解决办法:在项目文件 xxxx.pro中添加下面行:
QMAKE_CXXFLAGS += -std=c++11
版权声明:本文为simplay原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。