I defined a class inherited from QDialog, the class has a QwtPlot, when I compile the project, LNK 2001 error occured:
griddatadialog.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall GridDataDialog::metaObject(void)const " (?metaObject@GridDataDialog@@UBEPBUQMetaObject@@XZ )
1>griddatadialog.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall GridDataDialog::qt_metacast(char const *)" (?qt_metacast@GridDataDialog@@UAEPAXPBD@Z)
1>griddatadialog.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall GridDataDialog::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@GridDataDialog@@UAEHW4Call@QMetaObje ct@@HPAPAX@Z)
1>griddatadialog.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const GridDataDialog::staticMetaObject" (?staticMetaObject@GridDataDialog@@2UQMetaObject@@ B)
if I comment out the Q_OBJECT macro, no link error occured, but I can't use the buttons and combobox in the dialog, I've defined the QWT_DLL preprocessor, does anyone know how to solve this problem??Thanks a lot.
Added after 5 minutes:
Forget to say, I use Visual Studio 2005, and compile both the QWT source code and my own project in debug mode. How does the error occur???
Bookmarks