标签:exp 64位 size https blog int before pytho slots
qt5.9.0+python3.5.2 (都是32位)
可能与下面几点有关:
可能如下:
3.出现
D:\Python35\include/object.h:446:23: error: expected unqualified-id before ‘;‘
token PyType_Slot *slots; /* terminated by slot==0. */
原因:由于QT中定义了slots作为关键了,而python3中有使用slot作为变量,所以有冲突。
解决:只是在python的object.h中 slots冲突,因此修改object.h(原文件请备份):
#undef slots //这里添加 typedef struct{ const char* name; int basicsize; int itemsize; unsigned int flags; PyType_Slot *slots; /* terminated by slot==0. */ } PyType_Spec; #define slots Q_SLOTS //这里添加
【1】QT与Python混合编程经验记录:https://www.cnblogs.com/jiaping/p/6321859.html
【2】win10 + QT5.9.3 调用python程序(.py):https://blog.csdn.net/octdream/article/details/103177627
【3】Qt5(C++)调用python3脚本(带输入输出参数):https://blog.csdn.net/Sun_tian/article/details/104328564?depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-2&utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-2
标签:exp 64位 size https blog int before pytho slots
原文地址:https://www.cnblogs.com/nahaohao/p/12630322.html