[PyQt] pyqtdeploy to deployment PyQt5 application on win7

Phil Thompson phil at riverbankcomputing.com
Thu Jul 28 17:07:05 BST 2016


On 28 Jul 2016, at 4:31 pm, Zhao Lee <redstone-cold at 163.com> wrote:
> 
> I am using pyqtdeploy to deployment my PyQt5 application on win7,
> Working environment :
> OS: Win7 sp1 x86
> latest version of pyqt5,sip, pyqtdeploy installed using pip
> python 3.5.1
> qt-opensource-windows-x86-mingw530-5.7.0.exe 
> 
> 
>  after built the application code and the qmake .pro file, the qmake command get succeed , 
> <undefined>
> 
> 
> however, when run  nmake command , I got following error 
> 
> C:\Qt\SYSROOT\project\build>qmake
> Info: creating stash file C:\Qt\SYSROOT\project\build\.qmake.stash
> 
> C:\Qt\SYSROOT\project\build>nmake
> 
> Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
>        "C:\Program Files\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Make
> file.Release
> 
> Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
>        g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=gnu++11 -w -frtti -fexc
> eptions -mthreads -DPYQTDEPLOY_FROZEN_MAIN -DPYQTDEPLOY_OPTIMIZED -DMS_WINDOWS -
> D_WIN32_WINNT=Py_WINVER -DNTDDI_VERSION=Py_NTDDI -DWINVER=Py_WINVER -DQT_NO_DEBU
> G -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I. -I..\..\..\..
> \Users\i\AppData\Local\Programs\Python\Python35-32\include -I..\..\..\Qt5.7.0\5.
> 7\mingw53_32\include -I..\..\..\Qt5.7.0\5.7\mingw53_32\include\QtWidgets -I..\..
> \..\Qt5.7.0\5.7\mingw53_32\include\QtGui -I..\..\..\Qt5.7.0\5.7\mingw53_32\inclu
> de\QtANGLE -I..\..\..\Qt5.7.0\5.7\mingw53_32\include\QtCore -Irelease -I..\..\..
> \Qt5.7.0\5.7\mingw53_32\mkspecs\win32-g++ -o release\pyqtdeploy_main.o pyqtdeplo
> y_main.cpp
> In file included from C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/c
> ++/random:38:0,
>                 from C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/c
> ++/bits/stl_algo.h:66,
>                 from C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/c
> ++/algorithm:62,
>                 from C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtCore/qglobal.h:94,
>                 from C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtCore/QtGlobal:1,
>                 from pyqtdeploy_main.cpp:2:
> C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/cmath:1119:11: erro
> r: '::hypot' has not been declared
>   using ::hypot;
>           ^
> In file included from C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/o
> bjbase.h:14:0,
>                 from C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/o
> le2.h:17,
>                 from C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/w
> types.h:12,
>                 from C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/w
> inscard.h:10,
>                 from C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/w
> indows.h:97,
>                 from pyqtdeploy_main.cpp:62:
> C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/combaseapi.h:230:79: er
> ror: 'SOLE_AUTHENTICATION_SERVICE' has not been declared
> WINOLEAPI CoInitializeSecurity (PSECURITY_DESCRIPTOR pSecDesc, LONG cAuthSvc, S
> OLE_AUTHENTICATION_SERVICE *asAuthSvc, void *pReserved1, DWORD dwAuthnLevel, DWO
> RD dwImpLevel, void *pAuthList, DWORD dwCapabilities, void *pReserved3);
>                                                                               ^
> 
> C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/combaseapi.h:255:60: er
> ror: 'SOLE_AUTHENTICATION_SERVICE' has not been declared
> WINOLEAPI CoQueryAuthenticationServices (DWORD *pcAuthSvc, SOLE_AUTHENTICATION_
> SERVICE **asAuthSvc);
>                                                            ^
> NMAKE : fatal error U1077: “C:\Qt\Qt5.7.0\Tools\mingw530_32\bin\g++.EXE”: return code “0x1”
> Stop.
> NMAKE : fatal error U1077: “"C:\Program Files\Microsoft Visual Studio 14.0\VC\B
> IN\nmake.exe"”: return code “0x2”
> Stop.
> 
> C:\Qt\SYSROOT\project\build>
> 
> <undefined>
> (1) any way to fix the problem ?
> (2)  after built the application code and the qmake .pro file, if everything is ok, I think we can use Qt Creator to open and run  the generated project ,  is the deduction right ? so when I run the project , I nearly get the same error like above 
> 
> my project files here https://drive.google.com/file/d/0B0yEgmz6VGdzYWE3cHBQc0VNQXc/view?usp=sharing
> 
> <undefined>

You are using MinGW but also nmake?

I don't use MinGW so I don't know if pyqtdeploy has problems with it.

pyqtdeploy has yet to be updated for PyQt v5.7.

Phil


More information about the PyQt mailing list