Qmake: Error compiling qtforms from the Maya devkit [C++]

203 views
Skip to first unread message

Settoken

unread,
Nov 18, 2015, 11:11:59 AM11/18/15
to Python Programming for Autodesk Maya

I'm trying to compile qtforms which is one of the Qt example plugins provided by Autodesk with the Maya Devkit. It demonstrates 3 different ways to integrate Qt in a maya plugin. 

You can find it here: devkit plug-ins 

I've been through several issues already but I am now stuck with errors while compiling.Here is the output:

C:\Program Files (x86)\Microsoft Visual Studio 12.0>cd C:\Users\A\Documents\Visu
al Studio 2013\Projects\qtForms

C:\Users\A\Documents\Visual Studio 2013\Projects\qtForms>nmake -f Makefile.qt re
lease\qtForms.mll

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

        qmake -makefile -o qtForms.mak qtForms.pro
        "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe" -
nologo -f qtForms.mak
        "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe" -
f qtForms.mak.Release
        C:\Autodesk\Maya2016\bin\moc.exe -DUNICODE -DWIN32 -DQT_NO_IMPORT_QT47_Q
ML -DNDEBUG -D_WINDOWS -DNT_PLUGIN -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_XML_L
IB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_H
AVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\Autodesk\Maya2016\include\Qt
UiTools" -I"c:\Autodesk\Maya2016\include\QtCore" -I"c:\Autodesk\Maya2016\include
\QtGui" -I"c:\Autodesk\Maya2016\include\QtXml" -I"c:\Autodesk\Maya2016\include"
-I"." -I"..\..\include" -I"c:\Autodesk\Maya2016\include\ActiveQt" -I"release" -I
"." -I"c:\Autodesk\Maya2016\mkspecs\win32-msvc2012" -D_MSC_VER=1700 -DWIN32 qtFo
rms.h -o release\moc_qtForms.cpp
        c:\Autodesk\Maya2016\bin\rcc.exe -name qtForms qtForms.qrc -o release\qr
c_qtForms.cpp
        cl -c -nologo -Zm200 -Zc:wchar_t /FD /GS -O2 -MD -Zi -W3 -w34100 -w34189
 -GR -EHsc -DUNICODE -DWIN32 -DQT_NO_IMPORT_QT47_QML -DNDEBUG -D_WINDOWS -DNT_PL
UGIN -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB
-DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT
_THREAD_SUPPORT -I"c:\Autodesk\Maya2016\include\QtUiTools" -I"c:\Autodesk\Maya20
16\include\QtCore" -I"c:\Autodesk\Maya2016\include\QtGui" -I"c:\Autodesk\Maya201
6\include\QtXml" -I"c:\Autodesk\Maya2016\include" -I"." -I"..\..\include" -I"c:\
Autodesk\Maya2016\include\ActiveQt" -I"release" -I"." -I"c:\Autodesk\Maya2016\mk
specs\win32-msvc2012" -Forelease\ @C:\Users\A\AppData\Local\Temp\nm81FD.tmp
qtForms.cpp
        cl -c -nologo -Zm200 -Zc:wchar_t /FD /GS -O2 -MD -Zi -W3 -w34100 -w34189
 -GR -EHsc -DUNICODE -DWIN32 -DQT_NO_IMPORT_QT47_QML -DNDEBUG -D_WINDOWS -DNT_PL
UGIN -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB
-DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT
_THREAD_SUPPORT -I"c:\Autodesk\Maya2016\include\QtUiTools" -I"c:\Autodesk\Maya20
16\include\QtCore" -I"c:\Autodesk\Maya2016\include\QtGui" -I"c:\Autodesk\Maya201
6\include\QtXml" -I"c:\Autodesk\Maya2016\include" -I"." -I"..\..\include" -I"c:\
Autodesk\Maya2016\include\ActiveQt" -I"release" -I"." -I"c:\Autodesk\Maya2016\mk
specs\win32-msvc2012" -Forelease\ @C:\Users\A\AppData\Local\Temp\nm8604.tmp
moc_qtForms.cpp
c:\Autodesk\Maya2016\include\QtCore/qmetatype.h(357) : error C2065: 'ULONG' : un
declared identifier
c:\Autodesk\Maya2016\include\QtCore/qmetatype.h(357) : error C2923: 'QMetaTypeId
2' : 'ULONG' is not a valid template type argument for parameter 'T'
c:\Autodesk\Maya2016\include\QtCore/qmetatype.h(357) : error C2913: explicit spe
cialization; 'QMetaTypeId2' is not a specialization of a class template

[...same error on different lines]

c:\Autodesk\Maya2016\include\QtCore/qmetatype.h(412) : error C2913: explicit spe
cialization; 'QMetaTypeId2' is not a specialization of a class template
c:\Autodesk\Maya2016\include\QtCore/qhash.h(69) : error C2065: 'ULONG' : undecla
red identifier
c:\Autodesk\Maya2016\include\QtCore/qhash.h(69) : error C2146: syntax error : mi
ssing ')' before identifier 'key'
c:\Autodesk\Maya2016\include\QtCore/qhash.h(69) : error C2433: 'qHash' : 'inline
' not permitted on data declarations
c:\Autodesk\Maya2016\include\QtCore/qhash.h(69) : error C2365: 'qHash' : redefin
ition; previous definition was 'function'
c:\Autodesk\Maya2016\include\QtCore/qhash.h(69) : error C2059: syntax error : ')
'
c:\Autodesk\Maya2016\include\QtCore/qhash.h(70) : error C2143: syntax error : mi
ssing ';' before '{'
c:\Autodesk\Maya2016\include\QtCore/qhash.h(70) : error C2447: '{' : missing fun
ction header (old-style formal list?)
c:\Autodesk\Maya2016\include\QtCore/qhash.h(77) : error C3861: 'ULONG': identifi
er not found
c:\autodesk\maya2016\include\qtcore\qvariant.h(612) : error C2913: explicit spec
ialization; 'QMetaTypeId2' is not a specialization of a class template
c:\autodesk\maya2016\include\qtcore\qvariant.h(613) : error C2913: explicit spec
ialization; 'QMetaTypeId2' is not a specialization of a class template
c:\autodesk\maya2016\include\qtcore\qvariant.h(614) : error C2913: explicit spec
ialization; 'QMetaTypeId2' is not a specialization of a class template
qrc_qtForms.cpp
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.


I've found this thread which seems pretty similar to what I'm experiencing right now. 

Any idea how I can fix this ?

Justin Israel

unread,
Nov 18, 2015, 1:43:31 PM11/18/15
to Python Programming for Autodesk Maya

Are you using a compiler and Qt version that is compatible with Maya 2016?


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/aef4e47d-7c45-4c41-8959-c999e488d21f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Settoken

unread,
Nov 18, 2015, 3:29:50 PM11/18/15
to Python Programming for Autodesk Maya
Well I'm not sure about the compiler. I'm using the visual studio 2013 command prompt, QMAKESPEC is set on win32-msvc2010, and the Qt version is the 4.8.6 shipping with Maya2016 and the devkit.

I've found this, but I don't really know what I'm supposed to do with that information. 
...

Justin Israel

unread,
Nov 18, 2015, 3:40:14 PM11/18/15
to Python Programming for Autodesk Maya
I don't know much about compiling on Windows, but that is telling you the required version of Visual Studio, for compatibility with Maya 2016. I know that when compiling Maya plugins, on Windows, you have to use the right msvc version to match the particular Maya. 

Aside from that, your error suggests missing includes. Have you tried adding:   #include <windows.h> 
to your plugin?

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

Settoken

unread,
Nov 18, 2015, 4:26:45 PM11/18/15
to Python Programming for Autodesk Maya
Yes but no result. 
...

Robert White

unread,
Nov 18, 2015, 5:26:00 PM11/18/15
to Python Programming for Autodesk Maya
Maya 2016 on windows uses VS2012 not 2013. So you'll need to install the other compiler. I believe there is a way to tell VS2013 to use older compilers, but I'm not sure how on earth to go about doing that.
Also if you don't want the entire VS2012 installation you should be able to use the Windows8 SDK instead, it contains the compilers and a command line shortcut to run everything in.
...

Settoken

unread,
Nov 18, 2015, 10:03:03 PM11/18/15
to Python Programming for Autodesk Maya
Unfortunately I've already tried to compile with VS2012. I just installed the update 4 to see if it helps but it doesn't.
Here is the output:


C:\Users\A\Documents\Visual Studio 2013\Projects\qtForms>nmake -f Makefile.qt re
lease\qtForms.mll

Microsoft (R) Program Maintenance Utility Version 11.00.50727.1
Copyright (C) Microsoft Corporation.  All rights reserved.

        qmake -makefile -o qtForms.mak qtForms.pro
        "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\amd64\nmake.
exe" -nologo -f qtForms.mak
        "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\amd64\nmake.
exe" -f qtForms.mak.Release
        C:\Autodesk\Maya2016\bin\moc.exe -DUNICODE -DWIN32 -DNDEBUG -D_WINDOWS -
DNT_PLUGIN -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_XML_LIB -DQT_GUI_LIB -DQT_COR
E_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE
2 -DQT_THREAD_SUPPORT -I"c:\Autodesk\Maya2016\include\QtUiTools" -I"c:\Autodesk\
Maya2016\include\QtCore" -I"c:\Autodesk\Maya2016\include\QtGui" -I"c:\Autodesk\M
aya2016\include\QtXml" -I"c:\Autodesk\Maya2016\include" -I"." -I"..\..\include"
-I"c:\Autodesk\Maya2016\include\ActiveQt" -I"release" -I"." -I"c:\Autodesk\Maya2
016\mkspecs\win32-msvc2010" -D_MSC_VER=1600 -DWIN32 qtForms.h -o release\moc_qtF
orms.cpp
        c:\Autodesk\Maya2016\bin\rcc.exe -name qtForms qtForms.qrc -o release\qr
c_qtForms.cpp
        cl -c -nologo -Zm200 -Zc:wchar_t /FD /GS -O2 -MD -Zi -W3 -w34100 -w34189
 -GR -EHsc -DUNICODE -DWIN32 -DNDEBUG -D_WINDOWS -DNT_PLUGIN -DQT_DLL -DQT_NO_DE
BUG -DQT_PLUGIN -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_
3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\Au
todesk\Maya2016\include\QtUiTools" -I"c:\Autodesk\Maya2016\include\QtCore" -I"c:
\Autodesk\Maya2016\include\QtGui" -I"c:\Autodesk\Maya2016\include\QtXml" -I"c:\A
utodesk\Maya2016\include" -I"." -I"..\..\include" -I"c:\Autodesk\Maya2016\includ
e\ActiveQt" -I"release" -I"." -I"c:\Autodesk\Maya2016\mkspecs\win32-msvc2010" -F
orelease\ @C:\Users\A\AppData\Local\Temp\nm4940.tmp
qtForms.cpp
        cl -c -nologo -Zm200 -Zc:wchar_t /FD /GS -O2 -MD -Zi -W3 -w34100 -w34189
 -GR -EHsc -DUNICODE -DWIN32 -DNDEBUG -D_WINDOWS -DNT_PLUGIN -DQT_DLL -DQT_NO_DE
BUG -DQT_PLUGIN -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_
3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\Au
todesk\Maya2016\include\QtUiTools" -I"c:\Autodesk\Maya2016\include\QtCore" -I"c:
\Autodesk\Maya2016\include\QtGui" -I"c:\Autodesk\Maya2016\include\QtXml" -I"c:\A
utodesk\Maya2016\include" -I"." -I"..\..\include" -I"c:\Autodesk\Maya2016\includ
e\ActiveQt" -I"release" -I"." -I"c:\Autodesk\Maya2016\mkspecs\win32-msvc2010" -F
orelease\ @C:\Users\A\AppData\Local\Temp\nm61DF.tmp
c:\autodesk\maya2016\include\qtcore\qvariant.h(614) : error C2913: explicit spec
ialization; 'QMetaTypeId2' is not a specialization of a class template
qrc_qtForms.cpp
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\BIN\amd64\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
...

Settoken

unread,
Nov 18, 2015, 10:53:02 PM11/18/15
to Python Programming for Autodesk Maya
According to this: http://stackoverflow.com/questions/6943865/visual-c-cant-find-windows-types-like-pvoid-dword-ulong-etc, I've given #include<windows.h> another try, this time including it before anything else in qtForms.h and it worked.
Thank you for your help.


c:\Autodesk\Maya2016\include\QtCore/qhash.h<span style="c

Justin Israel

unread,
Nov 19, 2015, 1:07:53 AM11/19/15
to Python Programming for Autodesk Maya
Ah cool. Glad that ended up sorting it out. Because I was out of suggestions :-)

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages