2016-07-01 5 views
0

cmakeプロジェクトでエラーメッセージを投げている最小限のデモを作成しました。私のC++ 11でQt5を使用することはできないようです。minimal error demo コードにはエラーがなく、独自にコンパイルされます。誰かが何が問題であろうと説明できますか?Qt5プロジェクトで_GLIBCXX_ABI_TAG_CXX11エラーが発生しました

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 
    ^

答えて

0
#include <QApplication> 

残念ながらweird_fail.cpp

+0

の先頭に、これは – dgrat

+0

動作しない、あなたは他のすべてが含まれる前にそれがあることを確認していますか? havokを破壊している 'Functions.h'に' #define __attribute'があります。 'Functions.h'は、本当にそのファイルが必要な場合は、最後に含めてください。または '__attribute'の名前を' MY_ATTRIBUTE'のように変更してください。 – Velkan

+0

マクロ定義 – dgrat

関連する問題