Я использую XML модуль Qt для чтения/записи конфигурационного файла приложения. Класс, который должен это осуществлять находится в зачаточном состоянии. И сразу наткнулся на проблему.
#ifndef CCONFIGDISPATCHER_H
#define CCONFIGDISPATCHER_H
#include <QObject>
#include <QtXml/QtXml>
class CConfigDispatcher : public QObject
{
Q_OBJECT
private:
QFile ConfigFile;
QDomDocument ConfigDocument;
public:
CConfigDispatcher(QObject *parent = 0);
~CConfigDispatcher();
bool OpenConfigDocument(QString FileName);
};
#endif
/******************************************************************************/
#include "cconfigdispatcher.h"
CConfigDispatcher::CConfigDispatcher(QObject *parent)
: QObject(parent)
{
}
CConfigDispatcher::~CConfigDispatcher()
{
}
bool CConfigDispatcher::OpenConfigDocument(QString FileName)
{
ConfigFile.setFileName(FileName);
return ConfigFile.open(QIODevice::ReadWrite);
}
pro файл проекта;
SUBDIRS += src
TEMPLATE = subdirs
QT += xml
CONFIG += warn_on \
qt \
thread
Во время линковки (?) происходит ошибка:
...cconfigdispatcher.cpp:11: undefined reference to `QDomDocument::~QDomDocument()'
...cconfigdispatcher.cpp:5: undefined reference to `QDomDocument::QDomDocument()'
Обшарил всю документацию. Обшарил интернет. Ответ пока не нашёл. Складывается такое ощущение, что отсувствует какая-то из библиотек Qt.
Однако заголовочные файлы на месте. Кто-нибудь сталкивался с такой проблемой?
ОС Fedora 8 64 bit, ядро 2.6.24.3-12.fc8
информация о Qt, полученная через yum:
CODE
# yum info qt
Installed Packages
Name : qt
Arch : i386
Epoch : 1
Version: 3.3.8b
Release: 2.fc8
Size : 8.9 M
Repo : installed
Summary: Разделяемая библиотека для инструмента Qt GUI.
Description:
Qt is a GUI software toolkit which simplifies the task of writing and
maintaining GUI (Graphical User Interface) applications
for the X Window System.
Qt is written in C++ and is fully object-oriented.
This package contains the shared library needed to run qt
applications, as well as the README files for qt.
Name : qt
Arch : x86_64
Epoch : 1
Version: 3.3.8b
Release: 2.fc8
Size : 9.6 M
Repo : installed
Summary: Разделяемая библиотека для инструмента Qt GUI.
Description:
Qt is a GUI software toolkit which simplifies the task of writing and
maintaining GUI (Graphical User Interface) applications
for the X Window System.
Qt is written in C++ and is fully object-oriented.
This package contains the shared library needed to run qt
applications, as well as the README files for qt.
Installed Packages
Name : qt
Arch : i386
Epoch : 1
Version: 3.3.8b
Release: 2.fc8
Size : 8.9 M
Repo : installed
Summary: Разделяемая библиотека для инструмента Qt GUI.
Description:
Qt is a GUI software toolkit which simplifies the task of writing and
maintaining GUI (Graphical User Interface) applications
for the X Window System.
Qt is written in C++ and is fully object-oriented.
This package contains the shared library needed to run qt
applications, as well as the README files for qt.
Name : qt
Arch : x86_64
Epoch : 1
Version: 3.3.8b
Release: 2.fc8
Size : 9.6 M
Repo : installed
Summary: Разделяемая библиотека для инструмента Qt GUI.
Description:
Qt is a GUI software toolkit which simplifies the task of writing and
maintaining GUI (Graphical User Interface) applications
for the X Window System.
Qt is written in C++ and is fully object-oriented.
This package contains the shared library needed to run qt
applications, as well as the README files for qt.