Hallo Leute,
ich habe folgenden Error beim einbinden einer Klasse aus einem anderen Projekt:
(Ich Programmiere in QT)
"main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: __thiscall Dictionary:
ictionary(class QString)" (****0Dictionary@@QAE@VQString@@@Z)" in Funktion "_main"."
Weiß jemand was ich falsch mache :-D
Der Code wie Folgt:
Der Header von Dictionary:
Vielen Dank in Vorraus.
ich habe folgenden Error beim einbinden einer Klasse aus einem anderen Projekt:
(Ich Programmiere in QT)
"main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: __thiscall Dictionary:

Weiß jemand was ich falsch mache :-D
Der Code wie Folgt:
Code:
#include "auswertung.h"
#include <QtGui/QApplication>
#include <Dictionary.h>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
auswertung w;
QString bla("D:/test_Dictionary.dic");
Dictionary * dic = new Dictionary(bla);
w.show();
return a.exec();
}
Der Header von Dictionary:
Code:
#pragma once
/*
* A Dictionary class
* contains a list of all words and their pronounciations
* contains a list of entries in the dictionary called "lines"
* contains a list of all phones in the Dictionary and their probabilitys
*/
#include <qhash.h>
#include <qstringlist.h>
#include <QTime>
#include <qfile.h>
#include <qiodevice.h>
#include <qtextstream.h>
#include "Phonem.h"
class Dictionary
{
public:
Dictionary(QString path);
~Dictionary(void);
QString getPath();
void setPath(QString path);
QStringList getRandomWords();
QStringList getWordLines();
QStringList getPhoneLines();
QStringList getPhoneStrings();
QList<Phonem*> getPhoneme();
int indexOfPhonem(QString phone);
int indexOfPhonem(Phonem * phone);
Phonem * getPhonemAt(int index);
QStringList getLines();
QHash<QString, QString> getWord2PhoneMap();
QHash<QString, QString> getPhone2WordMap();
int add(QString word, QString phone);
bool addLine(QString line);
void mkPhones();
void setDicIsFinish(bool isFinish);
Phonem * getPhone2Graphem(WordPart * part);
Phonem * getPhone2Graphem(QString part);
double getProbability(WordPart * graphem, QString phonem);
double getProbability(WordPart * graphem, Phonem * phonem);
void restore();
void flush();
void close();
static QStringList WHITE_SPACES, //a list of all space chars and the empty String
DISCONNECTORS; //a list of some disconnectors in the Dictionary between Graphem- and Phonemgroup
static int MIN_RAND_WORDS //min number of random words to generate
, MAX_RAND_WORDS; //max number of random words to generate
private:
bool isFinish; //if it´s true there is no way to restore the Dictionary
QString path;
QString disconnector; //the disconnector betwenn graphem- and phonemgroup to save
QFile * dic;
QStringList lines;
QStringList backUp;
QStringList words; //list of graphemgroups- 1:1 to phoneLines
QStringList phoneLines; //list of phonemgroups - 1:1 to words
QStringList phoneStrings; //list of all phones as String
QList<Phonem*> phones; //list of all phones as member form type Phonem
QHash<QString, QString> word2phone; //mapped graphemgroup to phonegroup
QHash<QString, QString> phone2word; //mapped phonegroup to graphemgroup
};
Vielen Dank in Vorraus.