Hi,
I have a class in library as:
class MY_EXPORT MyWidget
: public QWidget{
Q_OBJECT
...
};
class MY_EXPORT MyWidget : public QWidget
{
Q_OBJECT
...
};
To copy to clipboard, switch view to plain text mode
Where in Windows, MY_EXPORT is defined as "__declspec(dllexport)"
Now I use this class to build executable by linking to its library
class DerivedWidget : public MyWidget {
Q_OBJECT
...
};.
class DerivedWidget : public MyWidget {
Q_OBJECT
...
};.
To copy to clipboard, switch view to plain text mode
On linking, it complains errors:
moc_DerivedWidget.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const MyWidget::staticMetaObject" (?staticMetaObject@MyWidget@@2UQMetaObject@@B)
Please help. Many thanks!
Bookmarks