1
我正在使用pyqtdeploy將一個非常簡單的python腳本打包到Qt項目中。然後我會嘗試將它編譯爲.apk文件。我認爲到目前爲止環境已經完全建立,包括Android SDK,Android NDK,Qt,android studio,ant等。運行pyqtdeploy時總會出現一個奇怪的錯誤。pyqtdeploy引發一個非常奇怪的問題
這裏是我的代碼:
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QLabel
class Main(QWidget):
def __init__(self):
super().__init__()
self.build_inter()
def build_inter(self):
self.lb = QLabel("Test", self)
self.lb.move(0, 0)
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
w = Main()
sys.exit(app.exec_())
我截取的錯誤信息的一部分:
..\include/pyport.h:617:60: error: expected constructor, destructor, or type conversion before '(' token
# define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE
^
..\include/fileutils.h:109:1: note: in expansion of macro 'PyAPI_FUNC'
PyAPI_FUNC(int) _Py_get_inheritable(int fd);
^
..\include/pyport.h:617:60: error: expected constructor, destructor, or type conversion before '(' token
# define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE
^
..\include/fileutils.h:111:1: note: in expansion of macro 'PyAPI_FUNC'
PyAPI_FUNC(int) _Py_set_inheritable(int fd, int inheritable,
^
..\include/pyport.h:617:60: error: expected constructor, destructor, or type conversion before '(' token
# define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE
^
..\include/fileutils.h:114:1: note: in expansion of macro 'PyAPI_FUNC'
PyAPI_FUNC(int) _Py_dup(int fd);
和截圖:
我的配置:
有沒有人遇到過類似的問題?我應該做些什麼?
在此先感謝!