PyQt在编译源代码时出错

时间:2011-10-21 23:26:21

标签: qt makefile install pyqt configure

我想为Qt 4.7.4安装PyQt,我从riverbankcomputing.co.uk下载了SIP和PyQt软件包。

我成功配置并安装了SIP并成功配置了PyQt。但是当我在终端中运行make时出现了这个错误:

/home/user/Desktop/PyQt-x11-gpl-4.8.5/QtCore/sipQtCoreQThread.cpp: In function ‘PyObject* meth_QThread_currentThreadId(PyObject*, PyObject*)’:

/home/user/Desktop/PyQt-x11-gpl-4.8.5/QtCore/sipQtCoreQThread.cpp:325:50: error: invalid conversion from ‘void*’ to ‘long unsigned int’

/home/user/Desktop/PyQt-x11-gpl-4.8.5/QtCore/sipQtCoreQThread.cpp:325:50: error: initializing argument 1 of ‘PyObject* PyLong_FromUnsignedLong(long unsigned int)’

make[1]: *** [sipQtCoreQThread.o] Error 1

make[1]: Leaving directory `/home/user/Desktop/PyQt-x11-gpl-4.8.5/QtCore'

make: *** [all] Error 2 

完整日志位于:http://www.text-upload.com/read.php?id=176672&c=5376703

你能帮我解决这个错误吗?谢谢!

2 个答案:

答案 0 :(得分:2)

根据构建日志,PyQt的配置脚本已经找到并且正在使用Qt的模拟器/嵌入式变体,而不是桌面变体。

尝试将Desktop变体的 qmake 路径传递给configure脚本:

python ./configure.py -q /home/user/.QtSDK/Desktop/Qt/4.7.4/gcc/bin/qmake

答案 1 :(得分:0)

有两种选择

python ./configure.py -q /home/user/.QtSDK/Desktop/Qt/4.7.4/gcc/bin/qmake

python ./configure.py -q /home/user/.QtSDK/Simulator/Qt/gcc/bin/qmake

秒将退出并显示一些错误代码。

我正在尝试第一个字符串。