日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學(xué)無(wú)先后,達(dá)者為師

網(wǎng)站首頁(yè) 編程語(yǔ)言 正文

C++在Qt中使用Python報(bào)錯(cuò)

作者:weixin_101 更新時(shí)間: 2023-07-08 編程語(yǔ)言

一. 導(dǎo)入頭文件報(bào)錯(cuò)

In included file: expected member name or ‘;’ after declaration specifiers object.h:227:23: error occurred here
在這里插入圖片描述



原因:

This happens because including Python.h first indirectly includes termios.h, which defines B0 to be 0, which in turn qpagedpaintdevice.h want’s to use as a variable name. Including Python.h after the Qt includes does pretty much the same thing the other way around with the string ‘slots’.



解決

  1. 雙擊錯(cuò)誤打開文件 object.h 文件
    在這里插入圖片描述

  2. 把沖突的slots 使用undef 和define

 PyType_Slot *slots; /* terminated by slot==0. */
 更改為
 #undef slots
 PyType_Slot *slots; /* terminated by slot==0. */
 #define slots Q_SLOTS

在這里插入圖片描述

重新構(gòu)建項(xiàng)目 已解決問題
在這里插入圖片描述



原文鏈接:https://blog.csdn.net/weixin_41560737/article/details/127269010

  • 上一篇:沒有了
  • 下一篇:沒有了
欄目分類
最近更新