PDA

View Full Version : Compile ERROR while integrating QT in C++ project



Prakash02
7th October 2010, 15:26
I am adding QT code to my C++ project ,i included all the required dll's,but i'm getting the error while compiling.

Error 1 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall noma::UI::SplashScreen::metaObject(void)const " (?metaObject@SplashScreen@UI@noma@@UBEPBUQMetaObje ct@@XZ)


On removal of Q_OBJECT,it executing successfully.

mcosta
7th October 2010, 15:34
what is the question?

wysota
7th October 2010, 17:37
You should integrate your C++ project into a Qt project not vice versa. Qt has some requirements when it comes to compilation that are fulfilled automatically if you use qmake for compilation. Without it you have to do additional steps so it's better to let qmake handle your C++ project (which it will happily do) instead of trying to manually compile Qt-based code.