Public static struct QMetaObject error
-
Hello,
I am trying to build a program bt it is showing some linking error like this :
WIN\binary\lib\AIRLook\win_vc10\x64\Debug\WebServicesClientAuthenticator.obj : warning LNK4042: object specified more than once; extras ignored
2>QTOpenDialog.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QTWorkspaceWindow::staticMetaObject" (?staticMetaObject@QTWorkspaceWindow@@2UQMetaObject@@B)
2>main\src\Lib64\Debug_Build\Debug\Applications\123D\Na123DUI10.dll : fatal error LNK1120: 1 unresolved externalscan anyone please tell me how to solve this.
-
Do a full clean of your project, run qmake and build it again. Probably an outdated moc file.
-
Did you forget Q_OBJECT macro in class declaration?
-
Thank you for the reply. But it doesn't work still showing the same error.. :(
-
toptan @ No i didnt. there is Q_OBJECT in class declaration but still the error is showing.. :(
-
Maybe you have forgot to export some method from your library, if it is a library?
-
Or maybe your class declaration (with the Q_OBJECT) is in a .cpp file and not an .h file?