[PySide] PySide 1.1.1 - Problems building pyside with Qt 4.8.0 both debug and release version on windows

Bjørn Helge Kjøsnes bjelge at nefines.com
Wed Apr 25 10:15:30 CEST 2012


Hi all,

I have not been able to make the PySide 1.1.1 compile with QT 4.8.0 and  
Python 2.7.3  on Windows with Visual Studio 2008 and CMake 2.8.8. 
Replacing QT 4.8.0 with QT 4.7.4 all compiles and installs.

This is what I have done so far:
On my disk, all code is in a Project folder on the E: drive where I have 
a folder for Python, for QT and for PySide. In pyside I have the 
depending libraries  that I explicitly adds to my cmake command.

I am able to compile shiboken from "Visual Studio 2008 Command prompt", 
but when I try to build PySide  I get this error:

[  6%] Building CXX object 
PySide/QtCore/CMakeFiles/QtCore.dir/PySide/QtCore/qfile_wrapper.cpp.obj
qfile_wrapper.cpp
E:\Projects\PySide\pyside-qt4.8+1.1.1\buildrelease\PySide\QtCore\PySide\QtCore\qfile_wrapper.cpp(1752) 
: error C2661: 'QFileWrapper::open' : no overloaded function takes 3 
arguments
NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe' : 
return code
'0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual 
Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual 
Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.


If anyone can point me in the right direction, I can give it a try to 
make a fix. I do code in both C++ and Python in other projects and 
PySide have become an important library for me on the Windows platform.

Kind regards
Bjorn Helge Kjosnes

My buildpyside.bat file that I run from e:\Project\pyside in Visual 
Studio 2008 command prompt:
@echo set all folders
SET PYTHONDIR=\Projects\Python\Python-2.7.3\PCbuild\
SET PYTHONVER=27
SET QTDIR=E:\Projects\QT\QT480
SET PYSIDESOURCEDIR=\Projects\PySide\
SET PYSIDEINSTALLDIR=\Projects\PySide\PySideInstall\
SET PSINSTALLD=%PYSIDEINSTALLDIR%Debug
SET PSINSTALLR=%PYSIDEINSTALLDIR%Release
SET SHIBOKENDIR=\Projects\PySide\shiboken-1.1.1
SET PYSIDEDIR=\Projects\PySide\pyside-qt4.8+1.1.1
SET PYSIDETOOLSDIR=\Projects\PySide\pyside-tools-0.2.13
SET LIBXML=E:\Projects\PySide\libxml2-2.7.8.win32\
SET LIBXSLT=E:\Projects\PySide\libxslt-1.1.26.win32\
SET LIBICONV=E:\Projects\PySide\iconv-1.9.2.win32\
SET LIBZLIB=E:\Projects\PySide\zlib-1.2.5\

SET 
PATH=%QTDIR%\bin;%LIBXML%bin;%LIBXSLT%bin;%LIBICONV%bin;%LIBZLIB%bin;%PATH%

@echo make install dir
mkdir %PYSIDEINSTALLDIR%

@echo go to pyside source dir
cd %PYSIDESOURCEDIR%

@echo PySide build release
@echo make shiboken
mkdir %PSINSTALLR%
cd %SHIBOKENDIR%
mkdir buildrelease
cd buildrelease
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=FALSE 
-DPYTHON_EXECUTABLE="%PYTHONDIR%python.exe" 
-DLIBXML2_LIBRARIES=%LIBXML%lib\libxml2.lib 
-DLIBXML2_INCLUDE_DIR=%LIBXML%include 
-DLIBXSLT_LIBRARIES=%LIBXSLT%lib\libxslt.lib 
-DLIBXSLT_INCLUDE_DIR=%LIBXSLT%include 
-DCMAKE_INSTALL_PREFIX="%PSINSTALLR%" ..
nmake install
@echo make pyside
cd %PYSIDEDIR%
mkdir buildrelease
cd buildrelease
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=FALSE 
-DCMAKE_INSTALL_PREFIX="%PSINSTALLR%" ..
nmake install
@echo make pyside tools
cd %PYSIDETOOLSDIR%
mkdir buildrelease
cd buildrelease
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=FALSE 
-DCMAKE_INSTALL_PREFIX="%PSINSTALLR%" ..
nmake install


@echo PySide build debug
@echo make shiboken debug
mkdir %PSINSTALLD%
cd %SHIBOKENDIR%
mkdir builddebug
cd builddebug
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=FALSE 
-DPYTHON_EXECUTABLE="%PYTHONDIR%python_d.exe" 
-DPYTHON_DEBUG_LIBRARY="%PYTHONDIR%python%PYTHONVER%_d.lib"  
-DPYTHON_LIBRARIES="%PYTHONDIR%python%PYTHONVER%_d.lib" 
-DLIBXML2_LIBRARIES=%LIBXML%lib\libxml2.lib 
-DLIBXML2_INCLUDE_DIR=%LIBXML%include 
-DLIBXSLT_LIBRARIES=%LIBXSLT%lib\libxslt.lib 
-DLIBXSLT_INCLUDE_DIR=%LIBXSLT%include 
-DCMAKE_INSTALL_PREFIX="%PSINSTALLD%" ..
nmake install
@echo make pyside debug
cd %PYSIDEDIR%
mkdir builddebug
cd builddebug
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=FALSE 
-DPYTHON_EXECUTABLE="%PYTHONDIR%python_d.exe" 
-DPYTHON_DEBUG_LIBRARY="%PYTHONDIR%python%PYTHONVER%_d.lib" 
-DPYTHON_LIBRARIES="%PYTHONDIR%python%PYTHONVER%_d.lib" 
-DCMAKE_INSTALL_PREFIX="%PSINSTALLD%" ..
nmake install
@echo make pyside tools debug
cd %PYSIDETOOLSDIR%
mkdir builddebug
cd builddebug
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=FALSE 
-DCMAKE_INSTALL_PREFIX="%PSINSTALLD%" ..
nmake install

cd %PYSIDEINSTALLDIR%
@echo Done building PySide Debug and Release version




More information about the PySide mailing list