我在 QT creator、Fedora 27 的项目中使用 CGAL、libQGLViewer 库
但它在库的头文件中显示错误
编译输出:
/usr/include/QtXml/qdom.h:99:20: error: variable ‘Q_XML_EXPORT QDomImplementation’ has initializer but incomplete type
class Q_XML_EXPORT QDomImplementation
^~~~~~~~~~~~~~~~~~
/usr/include/QtXml/qdom.h:101:1: error: expected primary-expression before ‘public’
public:
^~~~~~
/usr/include/QtXml/qdom.h:101:1: error: expected ‘}’ before ‘public’
/usr/include/QtXml/qdom.h:101:1: error: expected ‘,’ or ‘;’ before ‘public’
/usr/include/QtXml/qdom.h:103:30: error: ‘QDomImplementation’ does not name a type
QDomImplementation(const QDomImplementation&);
^~~~~~~~~~~~~~~~~~
/usr/include/QtXml/qdom.h:103:50: error: expected constructor, destructor, or type conversion before ‘;’ token
QDomImplementation(const QDomImplementation&);
^
/usr/include/QtXml/qdom.h:104:26: error: expected constructor, destructor, or type conversion before ‘;’ token
~QDomImplementation();
^
/usr/include/QtXml/qdom.h:105:5: error: ‘QDomImplementation’ does not name a type
QDomImplementation& operator= (const QDomImplementation&);
^~~~~~~~~~~~~~~~~~
/usr/include/QtXml/qdom.h:106:28: error: ‘QDomImplementation’ does not name a type
bool operator== (const QDomImplementation&) const;
^~~~~~~~~~~~~~~~~~
/usr/include/QtXml/qdom.h:106:49: error: non-member function ‘bool operator==(const int&)’ cannot have cv-qualifier
bool operator== (const QDomImplementation&) const;
^~~~~
/usr/include/QtXml/qdom.h:106:49: error: ‘bool operator==(const int&)’ must have an argument of class or enumerated type
/usr/include/QtXml/qdom.h:107:28: error: ‘QDomImplementation’ does not name a type
bool operator!= (const QDomImplementation&) const;
^~~~~~~~~~~~~~~~~~
/usr/include/QtXml/qdom.h:107:49: error: non-member function ‘bool operator!=(const int&)’ cannot have cv-qualifier
bool operator!= (const QDomImplementation&) const;
^~~~~
/usr/include/QtXml/qdom.h:107:49: error: ‘bool operator!=(const int&)’ must have an argument of class or enumerated type
/usr/include/QtXml/qdom.h:110:69: error: non-member function ‘bool hasFeature(const QString&, const QString&)’ cannot have cv-qualifier
bool hasFeature(const QString& feature, const QString& version) const;
^~~~~
/usr/include/QtXml/qdom.h:121:1: error: expected unqualified-id before ‘private’
private:
^~~~~~~
/usr/include/QtXml/qdom.h:123:51: error: expected constructor, destructor, or type conversion before ‘;’ token
QDomImplementation(QDomImplementationPrivate*);
^
/usr/include/QtXml/qdom.h:125:5: error: ‘friend’ used outside of class
friend class QDomDocument;
^~~~~~
/usr/include/QtXml/qdom.h:126:1: error: expected declaration before ‘}’ token
};
所有错误都出现在 QtXml/qdom.h 文件中,我不知道如何解决它们感谢任何帮助,谢谢