Search code examples
qtpluginsmaya

QCocoaColorPanelDelegate error while loading plugin in Maya 2013


I'm building a plugin for Maya 2013 that uses Qt. I have compiled and built it with gcc-4.8 and Qt v4.7.1 and when I load the plugin into Maya, Maya crashes and I get the following errors:

objc[24831]: Class QCocoaColorPanelDelegate is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QMacSoundDelegate is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QCocoaPanel is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QCocoaView is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QCocoaWindow is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QCocoaWindowDelegate is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QCocoaMenuLoader is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QNSApplication is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QCocoaApplicationDelegate is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QCocoaWindowCustomThemeFrame is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QCocoaToolBarDelegate is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QCocoaMenu is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QNSOpenSavePanelDelegate is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QCocoaFontPanelDelegate is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QNSWindowProxy is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QNSPanelProxy is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QCocoaPageLayoutDelegate is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QCocoaPrintPanelDelegate is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QNSMenu is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QNSStatusItem is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[24831]: Class QNSImageView is implemented in both /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.

After a lot of googling, I realized that the problem was caused by having Qt in my path and I was loading that one first which is causing both the windows Qt modules and the Maya Qt modules to be loaded and I should try ensuring that Maya’s path is first so it picked up the proper Qt.

Is there any way to resolve this issue?


Solution

  • I started with the plugin debugging. I started with removing the QT_LIBRARIES linkages in my CMake script and replaced them with the ones located in Maya(They were located in /Applications/Autodesk/maya2013/Maya.app/Contents/MacOS/). That solved the problem.

    Update : This is Mac OS specific. Remember to check for the same in other OSes too.