[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: pyqtdeploy-build creates compile errors on windows
From:       Patrick Stinson <patrickkidd () gmail ! com>
Date:       2020-10-14 7:24:09
Message-ID: 756B0A04-68A0-432D-B075-025516A5BF99 () gmail ! com
[Download RAW message or body]

Turns out including Python.h before including QtGui fixes the compile error. This is \
reproducible in the pyqtdeploy demo project, for example if you add #include <QtGui> \
at the top of pdytools_module.cpp.

Strangely, including windows.h before QtGui should fix this, but it doesn't.

At any rate, there is no bug fix for pyqtdeploy here and the workaround should just \
be known.

> On Oct 11, 2020, at 8:39 PM, Patrick Stinson <patrickkidd@gmail.com> wrote:
> 
> Scratch that. Turns out there are two registry keys that affect the long path \
> issue. This is the one that worked for me: 
> Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled
>  
> Can't remember where the other path was.
> 
> Still working on the compile error.
> 
> 
> > On Oct 11, 2020, at 6:18 PM, Patrick Stinson <patrickkidd@gmail.com \
> > <mailto:patrickkidd@gmail.com>> wrote: 
> > FWIW, in an effort to test this I tried to build the pyqtdeploy demo. But \
> > building the sysroot runs into that unbelievably annoying long pathname problem \
> > on windows, for example: 
> > C:\\familydiagram\\vendor\\src\\pyqtdeploy-3.1.1.dev2009161438\\demo\\sysroot-win- \
> > 64\\build\\qt-everywhere-src-5.15.0\\coin\\provisioning\\common\\windows\\conan_ma \
> > nifests\\libjpeg-turbo\\2.0.3\\qtproject\\stable\\package\\1c8544b57637b92dcdfce760b76b459bde0ce701\\conanmanifest.txt
> >  
> > I haven't found a fix for this, even allowing for long paths in the windows \
> > registry. I gave up building qt on windows for my own app and have just been \
> > using the qt.io <http://qt.io/> installer. 
> > How did you build the sysroot for the pyqtdeploy demo?
> > 
> > -Patrick
> > 
> > 
> > > On Oct 9, 2020, at 2:55 PM, Patrick Stinson <patrickkidd@gmail.com \
> > > <mailto:patrickkidd@gmail.com>> wrote: 
> > > 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
> > 
> 


[Attachment #3 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
line-break: after-white-space;" class="">Turns out including Python.h before \
including QtGui fixes the compile error. This is reproducible in the pyqtdeploy demo \
project, for example if you add #include &lt;QtGui&gt; at the top of \
pdytools_module.cpp.<div class=""><br class=""></div><div class="">Strangely, \
including windows.h before QtGui should fix this, but it doesn't.</div><div \
class=""><br class=""></div><div class="">At any rate, there is no bug fix for \
pyqtdeploy here and the workaround should just be known.<br class=""><div><br \
class=""><blockquote type="cite" class=""><div class="">On Oct 11, 2020, at 8:39 PM, \
Patrick Stinson &lt;<a href="mailto:patrickkidd@gmail.com" \
class="">patrickkidd@gmail.com</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" \
content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; \
-webkit-nbsp-mode: space; line-break: after-white-space;" class="">Scratch that. \
Turns out there are two registry keys that affect the long path issue. This is the \
one that worked for me:<div class=""><br class=""></div><div \
class="">Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled</div><div \
class=""><br class=""></div><div class="">Can't remember where the other path \
was.</div><div class=""><br class=""></div><div class="">Still working on the compile \
error.</div><div class=""><br class=""></div><div class=""><br class=""></div><div \
class=""><div class=""><blockquote type="cite" class=""><div class="">On Oct 11, \
2020, at 6:18 PM, Patrick Stinson &lt;<a href="mailto:patrickkidd@gmail.com" \
class="">patrickkidd@gmail.com</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" \
content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; \
-webkit-nbsp-mode: space; line-break: after-white-space;" class="">FWIW, in an effort \
to test this I tried to build the pyqtdeploy demo. But building the sysroot runs into \
that unbelievably annoying long pathname problem on windows, for example:<br \
class=""><div class=""><br class=""></div><div \
class="">C:\\familydiagram\\vendor\\src\\pyqtdeploy-3.1.1.dev2009161438\\demo\\sysroot \
-win-64\\build\\qt-everywhere-src-5.15.0\\coin\\provisioning\\common\\windows\\conan_m \
anifests\\libjpeg-turbo\\2.0.3\\qtproject\\stable\\package\\1c8544b57637b92dcdfce760b76b459bde0ce701\\conanmanifest.txt</div><div \
class=""><br class=""></div><div class="">I haven't found a fix for this, even \
allowing for long paths in the windows registry. I gave up building qt on windows for \
my own app and have just been using the <a href="http://qt.io/" \
class="">qt.io</a>&nbsp;installer.</div><div class=""><br class=""></div><div \
class="">How did you build the sysroot for the pyqtdeploy demo?</div><div \
class=""><br class=""></div><div class="">-Patrick</div><div class=""><br \
class=""></div><div class=""><br class=""><blockquote type="cite" class=""><div \
class="">On Oct 9, 2020, at 2:55 PM, Patrick Stinson &lt;<a \
href="mailto:patrickkidd@gmail.com" class="">patrickkidd@gmail.com</a>&gt; \
wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">I get \
the following compiler errors on a project created from pyqtdeploy-build with VSCode \
2019 Community on Windows 10:<br class=""><br class="">C:\Program Files (x86)\Windows \
Kits\10\include\10.0.18362.0\um\winuser.h(4383): error C2061: syntax error: \
identifier 'LPWNDCLASSEXA'<br class="">C:\Program Files (x86)\Windows \
Kits\10\include\10.0.18362.0\um\winuser.h(4391): error C2061: syntax error: \
identifier 'LPWNDCLASSEXW'<br class="">C:\Program Files (x86)\Windows \
Kits\10\include\10.0.18362.0\um\prsht.h(609): error C3646: 'hdr': unknown override \
specifier<br class="">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<br class="">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'<br class="">Stop.<br class="">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'<br class="">Stop.<br class=""><br class="">When I remove the following \
line from pyqtdeploy\builder\lib\post_configuration.pro the error goes away...<br \
class=""><br class=""> &nbsp;&nbsp;&nbsp;&nbsp;DEFINES += MS_WINDOWS \
NTDDI_VERSION=Py_NTDDI WINVER=Py_WINVER _WIN32_WINNT=Py_WINVER<br class=""><br \
class="">…but then I also got the following warning and unresolved symbols...<br \
class=""><br class="">LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use \
of other libs; use /NODEFAULTLIB:library<br class="">_ssl.obj : error LNK2019: \
unresolved external symbol __imp_CertOpenStore referenced in function \
ssl_collect_certificates<br class="">_ssl.obj : error LNK2019: unresolved external \
symbol __imp_CertCloseStore referenced in function _ssl_enum_certificates_impl<br \
class="">_ssl.obj : error LNK2019: unresolved external symbol \
__imp_CertEnumCertificatesInStore referenced in function \
_ssl_enum_certificates_impl<br class="">_ssl.obj : error LNK2019: unresolved external \
symbol __imp_CertFreeCertificateContext referenced in function \
_ssl_enum_certificates_impl<br class="">_ssl.obj : error LNK2019: unresolved external \
symbol __imp_CertEnumCRLsInStore referenced in function _ssl_enum_crls_impl<br \
class="">_ssl.obj : error LNK2019: unresolved external symbol \
__imp_CertFreeCRLContext referenced in function _ssl_enum_crls_impl<br \
class="">_ssl.obj : error LNK2019: unresolved external symbol \
__imp_CertAddStoreToCollection referenced in function ssl_collect_certificates<br \
class="">_ssl.obj : error LNK2019: unresolved external symbol \
__imp_CertGetEnhancedKeyUsage referenced in function parseKeyUsage<br \
class="">release\Family Diagram.exe : fatal error LNK1120: 8 unresolved externals<br \
class=""><br class="">…which I partially fixed by hacking adding the following to \
my .pro file:<br class=""><br class=""> LIBS += -lcrypt32<br class=""><br \
class="">…but then I get a successfully linked exe that exist immediately with a \
error code of 0.<br class=""><br class="">Cheers,<br \
class="">-Patrick</div></div></blockquote></div><br \
class=""></div></div></blockquote></div><br \
class=""></div></div></div></blockquote></div><br class=""></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic