我想将 Python 解释器嵌入到 Qt 5 应用程序中。
我在 Qt 5 中有一个工作应用程序,但是当我把
#include <Python.h>
在顶部(Qt 标头下方)编译中断为
../sample/python3.3m/object.h:432:23: error: expected member name or ';' after declaration specifiers
PyType_Slot *slots; /* terminated by slot==0. */
~~~~~~~~~~~ ^
当我将 Python 标头放在 Qt 标头上方时,它会中断
In file included from ../Qt5.0.1/5.0.1/clang_64/include/QtGui/QtGui:59:
../Qt5.0.1/5.0.1/clang_64/include/QtGui/qpagedpaintdevice.h:63:57: error: expected '}'
A0, A1, A2, A3, A5, A6, A7, A8, A9, B0, B1,
^
/usr/include/sys/termios.h:293:12: note: expanded from macro 'B0'
#define B0 0
^
../Qt5.0.1/5.0.1/clang_64/include/QtGui/qpagedpaintdevice.h:62:19: note: to match this '{'
enum PageSize { A4, B5, Letter, Legal, Executive,
^
1 error generated.
请问,有谁知道为什么会这样?我可能是因为 Qt 和 Python 定义了一些常用词?我能做些什么呢?