Patches for sip / PyQt-builder for mingw cross-compilation of python bindings

Phil Thompson phil at riverbankcomputing.com
Fri Sep 17 17:48:50 BST 2021


On 15/09/2021 16:23, Sandro Mani wrote:
>> Can you explain why this is needed?
>> 
>>> @@ -467,8 +469,9 @@ macx {
>>>          # TODO: is this still necessary for Python v3.8?
>>>          if not buildable.static:
>>>              pro_lines.extend(['win32 {',
>>> -                    '    LIBS += -L{}'.format(
>>> - self.qmake_quote(project.py_pylib_dir)),
>>> +                    '    LIBS += -L{libdir} -l{lib}'.format(
>>> + libdir=self.qmake_quote(project.py_pylib_dir),
>>> + lib=self.qmake_quote(project.py_pylib_lib)),
>>>                      '}'])
>>> 
>>>          # Add any installables from the buildable.
>> 
> I got undefined reference to various symbols defined in libpython. I
> couldn't figure out how else -lpythonX.Y was supposed to be added to
> the link flags, so I added it explicitly.

pythonX.Y should not be linked against - pythonX (where X is 3) if 
anything.

Phil


More information about the PyQt mailing list