简体   繁体   English

Qt5项目中的_GLIBCXX_ABI_TAG_CXX11错误

[英]_GLIBCXX_ABI_TAG_CXX11 error in Qt5 project

I created a minimal demo which is throwing error messages in a cmake project. 我创建了一个最小的演示,该演示在cmake项目中引发错误消息。 It looks like I can not use Qt5 in my C++11 minimal error demo The code is error free and compiles on its own. 看来我无法在C ++ 11 最小错误演示中使用Qt5。该代码无错误,并且可以自行编译。 Can someone explain what might be the problem? 有人可以解释可能是什么问题吗?

In file included from /usr/include/c++/4.8/cstddef:41:0,
                 from /usr/include/qt5/QtCore/qglobal.h:39,
                 from /usr/include/qt5/QtCore/qnamespace.h:37,
                 from /usr/include/qt5/QtCore/qobjectdefs.h:41,
                 from /usr/include/qt5/QtCore/qobject.h:40,
                 from /usr/include/qt5/QtCore/qabstractanimation.h:37,
                 from /usr/include/qt5/QtCore/QtCore:4,
                 from /usr/include/qt5/QtWidgets/QtWidgetsDepends:3,
                 from /usr/include/qt5/QtWidgets/QtWidgets:3,
                 from /home/dgrat/weird_fail/src/QSOMReader.h:15,
                 from /home/dgrat/weird_fail/src/weird_fail.cpp:2:
/usr/include/c++/4.8/bits/stl_tree.h:803:7: error: expected identifier before string constant
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_tree.h:803:7: error: expected ‘,’ or ‘...’ before string constant
/usr/include/c++/4.8/bits/stl_tree.h:803:7: error: expected ‘;’ at end of member declaration
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_tree.h:814:7: error: expected identifier before string constant
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_tree.h:814:7: error: expected ‘,’ or ‘...’ before string constant
/usr/include/c++/4.8/bits/stl_tree.h:814:7: error: expected ‘;’ at end of member declaration
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_tree.h:814:7: error: ‘int std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::__abi_tag__(int)’ cannot be overloaded
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_tree.h:803:7: error: with ‘int std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::__abi_tag__(int)’
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_tree.h:838:7: error: expected identifier before string constant
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_tree.h:838:7: error: expected ‘,’ or ‘...’ before string constant
/usr/include/c++/4.8/bits/stl_tree.h:838:7: error: expected ‘;’ at end of member declaration
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_tree.h:838:7: error: ‘int std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::__abi_tag__(int)’ cannot be overloaded
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_tree.h:803:7: error: with ‘int std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::__abi_tag__(int)’
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_map.h:694:7: error: expected identifier before string constant
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_map.h:694:7: error: expected ‘,’ or ‘...’ before string constant
/usr/include/c++/4.8/bits/stl_map.h:694:7: error: expected ‘;’ at end of member declaration
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_multimap.h:599:7: error: expected identifier before string constant
       _GLIBCXX_ABI_TAG_CXX11
       ^
/usr/include/c++/4.8/bits/stl_multimap.h:599:7: error: expected ‘,’ or ‘...’ before string constant
/usr/include/c++/4.8/bits/stl_multimap.h:599:7: error: expected ‘;’ at end of member declaration
       _GLIBCXX_ABI_TAG_CXX11
       ^
#include <QApplication>

weird_fail.cpp的开头

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM