Deploying PyQt5 QtQuick Application on windows



  • Hi,

    I am currently trying to deploy a PyQt5 QtQuick application on Windows. I have successfully done this already with pyqtdeploy on linux. The issue I am facing is when I try and build the project (in qt creator after running pyqtdeploy) I get the error "unknown type name 'SOLE_AUTHENTICATION_SERVICE'" orginating from "combaseapi.h" and "combaseapi.c" when it tries to compile python's "socketmodule.c".

    I feel that the error has somethind to do with trying to build python using Qt's mingw32 gcc compiler. Has anyone faced a similar issue before? I have also tried py2exe and cx_freeze and they didn't stack up so well either.

    Qt Version: 5.4.2
    Python version: 3.4.3

    Here is the full error:

    gcc -c -pipe -fno-keep-inline-dllexport -O2 -w -DPYQTDEPLOY_FROZEN_MAIN -DPYQTDEPLOY_OPTIMIZED -DMS_WINDOWS -D_WIN32_WINNT=Py_WINVER -DNTDDI_VERSION=Py_NTDDI -DWINVER=Py_WINVER -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I"..\build" -I"." -I"C:\Python34\include" -I"..\..\sysroot-windows\src\Python-3.4.2\Modules" -I"C:\Qt\Qt5.4.2\5.4\mingw491_32\include" -I"C:\Qt\Qt5.4.2\5.4\mingw491_32\include\QtWidgets" -I"C:\Qt\Qt5.4.2\5.4\mingw491_32\include\QtQuick" -I"C:\Qt\Qt5.4.2\5.4\mingw491_32\include\QtGui" -I"C:\Qt\Qt5.4.2\5.4\mingw491_32\include\QtQml" -I"C:\Qt\Qt5.4.2\5.4\mingw491_32\include\QtNetwork" -I"C:\Qt\Qt5.4.2\5.4\mingw491_32\include\QtCore" -I"release" -I"C:\Qt\Qt5.4.2\5.4\mingw491_32\mkspecs\win32-g++"  -o release\socketmodule.o ..\..\sysroot-windows\src\Python-3.4.2\Modules\socketmodule.c
    
    In file included from C:/Qt/Qt5.4.2/Tools/mingw491_32/i686-w64-mingw32/include/objbase.h:14:0,
                 from C:/Qt/Qt5.4.2/Tools/mingw491_32/i686-w64-mingw32/include/ole2.h:17,
                 from C:/Qt/Qt5.4.2/Tools/mingw491_32/i686-w64-mingw32/include/wtypes.h:12,
                 from C:/Qt/Qt5.4.2/Tools/mingw491_32/i686-w64-mingw32/include/winscard.h:10,
                 from C:/Qt/Qt5.4.2/Tools/mingw491_32/i686-w64-mingw32/include/windows.h:97,
                 from C:/Qt/Qt5.4.2/Tools/mingw491_32/i686-w64-mingw32/include/winsock2.h:23,
                 from ..\..\sysroot-windows\src\Python-3.4.2\Modules\socketmodule.h:16,
                 from ..\..\sysroot-windows\src\Python-3.4.2\Modules\socketmodule.c:265:
    C:/Qt/Qt5.4.2/Tools/mingw491_32/i686-w64-mingw32/include/combaseapi.h:231:79: error: unknown type name 'SOLE_AUTHENTICATION_SERVICE'
    WINOLEAPI CoInitializeSecurity (PSECURITY_DESCRIPTOR pSecDesc, LONG cAuthSvc, SOLE_AUTHENTICATION_SERVICE *asAuthSvc, void *pReserved1, DWORD dwAuthnLevel, DWORD dwImpLevel, void *pAuthList, DWORD dwCapabilities, void *pReserved3);
                                                                                   ^
    C:/Qt/Qt5.4.2/Tools/mingw491_32/i686-w64-mingw32/include/combaseapi.h:256:60: error: unknown type name 'SOLE_AUTHENTICATION_SERVICE'
    WINOLEAPI CoQueryAuthenticationServices (DWORD *pcAuthSvc, SOLE_AUTHENTICATION_SERVICE **asAuthSvc);
                                                                ^
    Makefile.Release:958: recipe for target 'release/socketmodule.o' failed
    mingw32-make[1]: *** [release/socketmodule.o] Error 1
    mingw32-make[1]: Leaving directory 'C:/Users/LENEL/Documents/jemip/build-jemip-Desktop_Qt_5_4_2_MinGW_32bit-Debug'
    makefile:34: recipe for target 'release' failed
    mingw32-make: *** [release] Error 2
    02:23:53: The process "C:\Qt\Qt5.4.2\Tools\mingw491_32\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project jemip (kit: Desktop Qt 5.4.2 MinGW 32bit)
    When executing step "Make"


  • Same problem. Qt 5.8, Python 3.6



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.