Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Public static struct QMetaObject error
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 externals
can 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.
toptan last edited by
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?
hskoglund last edited by
Or maybe your class declaration (with the Q_OBJECT) is in a .cpp file and not an .h file?