qt在编译c++11 的<"thread">头文件时报错:
1. d:\Qt\Qt5.6.2\Tools\mingw492_32\i686-w64-mingw32\include\c++\thread:235: error: expected primary-expression before '<<' token
return __out << "thread::id of a non-executing thread";
2.d:\Qt\Qt5.6.2\Tools\mingw492_32\i686-w64-mingw32\include\c++\thread:237: error: expected primary-expression before '<<' token
return __out << __id._M_thread;
只包括头文件也会报错
qmake 已添加:
QMAKE_CXXFLAGS += -std=c++11
QMAKE_LFLAGS += -Wl,--no-as-needed
LIBS += -lpthread
应该是符号“__out ”未定义,可能是某个头文件未包含或宏未打开,建议搜索__out,找到它的定义处