PythonQT 3.2 build failing on Windows
Dynamic Python binding for Qt Applications
Brought to you by:
florianlink,
marcusbarann
I opened the .PRO ( QTCreator 4.3.1) and built ( QT 5.7/VS2015) after setting correct Python versions and Paths
Notice the weird corruption of the path of 'D:\build\PythonQt3.2\liPythonQt-Qt5-Python36_d.lib
The file does exist in
'D:\build\PythonQt3.2\lib\PythonQt-Qt5-Python36_d.lib
I had no such problems building 3.1
LINK : fatal error LNK1104: cannot open file 'D:\build\PythonQt3.2\liPythonQt-Qt5-Python36_d.lib'
jom: D:\build\build-PythonQt-QT_5_7-Debug\extensions\PythonQt_QtAll\Makefile.Debug [....\lib\PythonQt_QtAll-Qt5-Python36_d3.dll] Error 1104
jom: D:\build\build-PythonQt-QT_5_7-Debug\extensions\PythonQt_QtAll\Makefile [debug] Error 2
jom: D:\build\build-PythonQt-QT_5_7-Debug\extensions\Makefile [sub-PythonQt_QtAll-make_first] Error 2
jom: D:\build\build-PythonQt-QT_5_7-Debug\Makefile [sub-extensions-make_first-ordered] Error 2
13:17:23: The process "D:\Qt59\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project PythonQt (kit: QT 5.7)
PythonQt_QtAll.prf and PythonQT.prf has this line
win32::LIBS += $$PWD/../liPythonQt-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
Last edit: Andrewc 2017-08-15
Now the next problem. For some reason the libraries are being built with an extra '3' added to the file name, which causes a link failure.
For example PythonQt-Qt5-Python36_d3.lib
Oddly, if I switch to QT 5.9 kit , the name becomes PythonQt-Qt5-Python36_d.vc.lib in the Makefiles
Last edit: Andrewc 2017-08-15
These renamings got in the last minute and were done for debian/linux dist, looks like the windows part was not tested. I will have a look and will fix it.
The liPythonQt was a typo, it should be PythonQt. I fixed that. I don't know why your libraries still have these postfixes, mine don't have these.
OK, thanks, I'll try and debug the postfix naming issue
In my opinion the postfix comes from the version of PythonQt (VERSION=3.2.0)
see https://stackoverflow.com/questions/404774/why-library-name-gets-an-additional-0-in-its-name
on linux its ok, so i would not add CONFIG += skip_target_version_ext, i would use the next solution:
win32: TARGET_EXT=.dll
But that is up to florian.
In my current patches i use the later one in src.pro and PythonQt_QtAll.pro
Sorry, another point:
fixing win32::LIBS += $$PWD/../liPythonQt-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
to $$PWD/../PythonQt-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
is not so good, cause in src.pro the TARGET directory is /lib
so do it like on linux, change this to $$PWD/../lib/
found out that the CONFIG += skip_target_version_ext is the better way.
this supports the INSTALLS += target commands. If not used, it cannot install lib,ext and other files