I am compiling my Qt project using compiler MSVC2008, and I am getting linker errors like-
_class_name.obj_:error LNK2001: unresolved external symbol "public: static struct QMetaObject...."... referenced in a function "_function_name_"
_class_name.obj_:error LNK2019: unresolved external symbol "public: static struct QMetaObject..." ... referenced in a function "_function_name_"
I have few basic queries-
what does it mean by errors LNK2001 and LNK2019?
Why these error occurs?
How to resolve these?
NOTE: I am using QtCreater so build system uses qmake and compiler used is MSVC2008.
In a nutshell, you used a function which is declared but not defined.
It should be caused by your classes using Qt functionality (like signal-slots) but incorrectly.
Here's possibilities I can think of:
3-a. Double check you've written "Q_OBJECT" at the beginning of your class that use Qt functionality.
3-b. You call "moc" property, i.e. check if your Qt Visual Studio plugin is installed and enabled.