pyqtdeploy-build creates compile errors on windows

Patrick Stinson patrickkidd at gmail.com
Fri Oct 9 23:55:22 BST 2020


I get the following compiler errors on a project created from pyqtdeploy-build with VSCode 2019 Community on Windows 10:

C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\winuser.h(4383): error C2061: syntax error: identifier 'LPWNDCLASSEXA'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\winuser.h(4391): error C2061: syntax error: identifier 'LPWNDCLASSEXW'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\prsht.h(609): error C3646: 'hdr': unknown override specifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\prsht.h(609): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.

When I remove the following line from pyqtdeploy\builder\lib\post_configuration.pro the error goes away...

     DEFINES += MS_WINDOWS NTDDI_VERSION=Py_NTDDI WINVER=Py_WINVER _WIN32_WINNT=Py_WINVER

…but then I also got the following warning and unresolved symbols...

LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
_ssl.obj : error LNK2019: unresolved external symbol __imp_CertOpenStore referenced in function ssl_collect_certificates
_ssl.obj : error LNK2019: unresolved external symbol __imp_CertCloseStore referenced in function _ssl_enum_certificates_impl
_ssl.obj : error LNK2019: unresolved external symbol __imp_CertEnumCertificatesInStore referenced in function _ssl_enum_certificates_impl
_ssl.obj : error LNK2019: unresolved external symbol __imp_CertFreeCertificateContext referenced in function _ssl_enum_certificates_impl
_ssl.obj : error LNK2019: unresolved external symbol __imp_CertEnumCRLsInStore referenced in function _ssl_enum_crls_impl
_ssl.obj : error LNK2019: unresolved external symbol __imp_CertFreeCRLContext referenced in function _ssl_enum_crls_impl
_ssl.obj : error LNK2019: unresolved external symbol __imp_CertAddStoreToCollection referenced in function ssl_collect_certificates
_ssl.obj : error LNK2019: unresolved external symbol __imp_CertGetEnhancedKeyUsage referenced in function parseKeyUsage
release\Family Diagram.exe : fatal error LNK1120: 8 unresolved externals

…which I partially fixed by hacking adding the following to my .pro file:

 LIBS += -lcrypt32

…but then I get a successfully linked exe that exist immediately with a error code of 0.

Cheers,
-Patrick


More information about the PyQt mailing list