Trouble building PySide for Maya 2016 on Windows 7

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi!
I downloaded Qt 4.8.6 modified for Maya 2016 from http://www.autodesk.com/company/legal-notices-trademarks/open-source-distribution. I was able to build Qt.
I went back to the earlier site. I could not find PySide for Maya 2016. I did find PySide 1.2.2 for Maya 2014. Since I know 1.2.2 is the most recent version of PySide, I decided to try that version. I consulted this link on building PySide for Windows: https://wiki.qt.io/Building_PySide_on_Windows.
I had to download copies of libxml2 and libxslt too. I ended up making some changes inside of the setup.py script that came with PySide, so the setup script would actually see those libraries.
cmake_cmd = [ OPTION_CMAKE, "-G", self.make_generator, "-DQT_QMAKE_EXECUTABLE=%s" % self.qmake_path, "-DBUILD_TESTS=%s" % self.build_tests, "-DDISABLE_DOCSTRINGS=True", "-DQT_RCC_EXECUTABLE=%s\\bin\\rcc.exe" % self.qt_path, "-DQT_QTCORE_INCLUDE_DIR=%s\\include\\QtCore" % self.qt_path, "-DQT_QTGUI_INCLUDE_DIR=%s\\include\\QtGui" % self.qt_path, "-DQT_QTXML_INCLUDE_DIR=%s\\include\\QtXml" % self.qt_path, "-DQT_UIC_EXECUTABLE=%s\\bin\\uic.exe" % self.qt_path, "-DQT_MOC_EXECUTABLE=%s\\bin\\moc.exe" % self.qt_path, "-DQT_INCLUDE_DIR=%s\\include" % self.qt_path, "-DQT_LIBRARY_DIR=%s\\lib" % self.qt_path, "-DQT_QTCORE_LIBRARY=%s\\bin\\QtCore4.dll" % self.qt_path, "-DCMAKE_BUILD_TYPE=%s" % self.build_type, "-DCMAKE_INSTALL_PREFIX=%s" % self.install_dir, "-DLIBXML2_LIBRARIES=D:\PySide_Maya2016\libxml2\lib", "-DLIBXML2_INCLUDE_DIR=D:\PySide_Maya2016\libxml2\include", "-DLIBXSLT_LIBRARIES=D:\PySide_Maya2016\libxslt\lib", "-DLIBXSLT_INCLUDE_DIR=D:\PySide_Maya2016\libxslt\include", module_src_dir ]
This is the command I used to do the build:
D:\PySide_Maya2016\PySide-1.2.2>setup.py bdist_wininst
--qmake=D:\PySide_Maya2016\qt\4.8.6\bin\qmake.exe
--openssl=..\qt\openssl\1.0.1g\x64
--cmake="C:\Program Files (x86)\CMake\bin\cmake.exe"
--qt="D:\PySide_Maya2016\qt\4.8.6"
Shiboken built correctly. However, I got a linking error when I tried to build Pyside itself:
Linking CXX shared module ..\QtCore.pyd Creating library QtCore.lib and object QtCore.exp qtcore_module_wrapper.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl QString::toWCharArray(unsigned short *)cons t " (__imp_?toWCharArray@QString@@QEBAHPEAG@Z) referenced in function "struct _object * __cdecl QStringRef_CppToPython_QStringRef(void const *)" (?QStringRef_Cp pToPython_QStringRef@@YAPEAU_object@@PEBX@Z) ..\QtCore.pyd : fatal error LNK1120: 1 unresolved externals LINK failed. with 1120 NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake\bin\cmake.exe"' : return code '0xffffffff' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe"' : return code '0x2' Stop. error: Error compiling pyside
Has anyone else come across this issue?