Python.h must be the first included header
Dynamic Python binding for Qt Applications
Brought to you by:
florianlink,
marcusbarann
I'm encountering some problems in building pytohnqt for macosx:
This is due to the fact that sometimes QT headers are included before Python.
This is not recommended (quoting https://docs.python.org/2/c-api/intro.html) "Since Python may define some pre-processor definitions which affect the standard headers on some systems, you must include Python.h before any standard headers are included."
To be able to build on macosx, 2 headers need to be swapped in
src/PythonQtClassInfo.h
andsrc/PythonQtMethodInfo.cpp
Here is the patch to the current trunk
I will have a look, you post was stuck in the admin moderation.
Strange fact: the code builds on MacOs on our servers...
I cleaned that up and commited on svn trunk.