<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">It looks like "expat/loadlibrary.c” needs to be added to the expat library sources in python_metadata.py for windows. I edited it like so:<div class=""><br class=""></div><div class=""><div class=""><font face="Monaco" class="">    'pyexpat':</font></div><div class=""><font face="Monaco" class="">        ExtensionModule(internal=True,</font></div><div class=""><font face="Monaco" class="">                source=('expat/xmlparse.c', 'expat/xmlrole.c',</font></div><div class=""><font face="Monaco" class="">                        'expat/xmltok.c', <u class="">'win#expat/loadlibrary.c', </u>'pyexpat.c'),</font></div><div class=""><font face="Monaco" class="">                defines=('XML_STATIC', 'win#COMPILED_FROM_DSP',</font></div><div class=""><font face="Monaco" class="">                        '!win#HAVE_EXPAT_CONFIG_H', '!win#XML_DEV_URANDOM'),</font></div><div class=""><font face="Monaco" class="">                includepath='expat',</font></div><div class=""><font face="Monaco" class="">                pyd='pyexpat.pyd'),</font></div><div class=""><br class=""></div><div class="">Further, I had to #include <Python.h> at the top of loadlibrary.c to prevent the same compile error I was getting if including Qt headers:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Monaco" class="">1>c:\program files\windows kits\10\include\10.0.17134.0\um\prsht.h(609): error C3646: 'hdr': unknown override specifier<br class="">1>c:\program files\windows kits\10\include\10.0.17134.0\um\prsht.h(609): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int</font></div><div class=""><br class=""></div></div><div class="">I fixed this for the rest of the project by adding a precompiled header in the QMAKE tab in pyqtdeploy with this in it:</div><div class=""><br class=""></div><div class=""><font face="Monaco" class="">#include <Python.h><br class=""><br class="">#if defined __cplusplus<br class=""><br class="">#include <QtCore><br class="">#include <QtGui><br class="">#include <QtPurchasing><br class=""><br class="">#endif // __cplusplus</font></div><div class=""><br class=""></div><div class=""> But this only adds a PCH for .cpp files and not loadlibrary.c, so I’m not sure how to work around this in the long run.</div><div class=""><div class=""><br class=""></div><div class="">Thoughts?</div></div><div class="">-Patrick</div></div></body></html>