Hi,

I have a class in library as:
Qt Code:
  1. class MY_EXPORT MyWidget : public QWidget
  2. {
  3. Q_OBJECT
  4. ...
  5. };
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
Qt Code:
  1. class DerivedWidget : public MyWidget {
  2. Q_OBJECT
  3. ...
  4. };.
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!