Hello. Im building a Maya plugin with the QT gui library for the first time and I'm having some problems compiling. I'm using Visual Studio 2012 and Maya 2014 with included QT lib and include folder.
The problem is that I didnt found any Visual Studio project with QT only a .cpp and .h files. I tryed to use an existing Visual Studio plugin project to compile with QT and I get some errors:
1>helixQtCmd.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __cdecl HelixButton::metaObject(void)const " (?metaObject@HelixButton@@UEBAPEBUQMetaObject@@XZ) 1>helixQtCmd.obj : error LNK2001: unresolved external symbol "public: virtual void * __cdecl HelixButton::qt_metacast(char const *)" (?qt_metacast@HelixButton@@UEAAPEAXPEBD@Z) 1>helixQtCmd.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl HelixButton::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@HelixButton@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
I linked all the libraries for QT and include folders. Also I'm using the helixQtCmd.h as a HEADER FILE and not Custom Build Tool with MOC.EXE
I dont understand this moc system. I compiled the .h file with moc and it generated me another cpp file. What should I do with that cpp file? The helixQtCmd sample plugin should run with or without moc generation ?
Thank you for your time.