building code already generated by sip-build

Edward A. Pier epier at oceanit.com
Thu Nov 16 14:12:43 GMT 2023


I am using sip to wrap some Qt-related C++ code in Python. I am running sip-build 6.7.12 under MSYS2 on Windows.

The project compilation fails with a long spew of errors coming from the qmetatype.h header file which is included by sipAPIxxx.h (I substituted xxx for the project name).

The includes at the top of that file look like this:

#include "sip.h"

#include <QMetaType>
#include <QThread>

I find that if I swap the order of the QMetaType and QThread includes, it compiles.

While it would be nice to understand and fix the ultimate cause of this problem, I would settle for a workaround where I generate the code, then modify the generated code, and then compile. I see there is a --no-compile option on sip-build that would handle the first thing, but I don't see a way to just compile already generated code with all the necessary compiler flags.

Thanx for your help, and let me know if you need any more info.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20231116/16a95732/attachment.htm>


More information about the PyQt mailing list