[Solved] error LNK2001: unresolved external symbol
-
Hello,
I have three errors and I don't know where it comes from and how to solve it. There were not here before. I have shown topics on the internet, but it's very confusing, and the proposals didn't work for me. The errors are
@errorMsg.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall errorMsg::metaObject(void)const " (?metaObject@errorMsg@@UBEPBUQMetaObject@@XZ)
errorMsg.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall errorMsg::qt_metacast(char const *)" (?qt_metacast@errorMsg@@UAEPAXPBD@Z)
errorMsg.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall errorMsg::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@errorMsg@@UAEHW4Call@QMetaObject@@HPAPAX@Z)@
-
The "~errorMsg();" is the destructor, but it is not so usefull.
I added your include line but it didn't change anything.
My includes are
@#include <QString>
#include <QFile>
#include <QTextStream>
#include <iostream>
#include <QDateTime>
#include <QLabel>
#include <QTextEdit>
#include <QtCore/QObject>
#include "mainform.h"@ -
[quote author="bern69" date="1396621287"]The "~errorMsg();" is the destructor, but it is not so usefull.
[/quote]
Obviously, but the "-" should read as a "~"...Indeed the include I told you to add is not needed since many widgets are already included.
I guess you've already tried to rerun qmake and it didn't change a thing.
Could you provide your (complete) .pro file?
Edit: is it only me who sees the tilda as an hyphen?