Jump to content
  • Advertisement
Sign in to follow this  
Papadopol

Qt in Maya

This topic is 1966 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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. Edited by Papadopol

Share this post


Link to post
Share on other sites
Advertisement

If you are using the Q_OBJECT macro (needed for defining new signals and slots), then you have to use MOC. I don't have much experiance with Qt, but this error seems to be like it's caused by missing MOC-generated code. The idea behind the MOC system is simple: it parses input files and generates some additional code, like information about classes (MOC is kind of compile time introspection system), or code of signal methods (you don't implement them yourself, it's done be MOC).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!