2009-09-15 110 views
3

我剛剛在雪豹64位上編譯了Qt4.6的最新預覽,沒有出現任何重大問題。64位雪豹上的PyQt4

http://qt.nokia.com/developer/qt-4.6-technology-preview#download-the-qt-4-1

現在,我想從江畔網站最新的快照做同樣的PyQt4.6。但是,編譯器退出時的以下問題:

g++ -c -pipe -fPIC -arch x86_64 -O2 -Wall -W -DNDEBUG -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/Users/drufat/Downloads/PyQt-mac-gpl-4.6-snapshot-20090914/qpy/QtCore -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -I/usr/local/Trolltech/Qt-4.6.0/mkspecs/default -I/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers -I/usr/local/Trolltech/Qt-4.6.0/include -F/Users/drufat/Downloads/PyQt-mac-gpl-4.6-snapshot-20090914/qpy/QtCore -F/usr/local/Trolltech/Qt-4.6.0/lib -o sipQtCoreQResource.o sipQtCoreQResource.cpp 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h: In copy constructor ‘QResource::QResource(const QResource&)’: 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:180: error: ‘QScopedPointer<T, Cleanup>::QScopedPointer(const QScopedPointer<T, Cleanup>&) [with T = QResourcePrivate, Cleanup = QScopedPointerDeleter<QResourcePrivate>]’ is private 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qresource.h:59: error: within this context 
sipQtCoreQResource.cpp: In constructor ‘sipQResource::sipQResource(const QResource&)’: 
sipQtCoreQResource.cpp:78: note: synthesized method ‘QResource::QResource(const QResource&)’ first required here 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h: In static member function ‘static void QScopedPointerDeleter<T>::cleanup(T*) [with T = QResourcePrivate]’: 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:100: instantiated from ‘QScopedPointer<T, Cleanup>::~QScopedPointer() [with T = QResourcePrivate, Cleanup = QScopedPointerDeleter<QResourcePrivate>]’ 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qresource.h:59: instantiated from here 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:59: error: invalid application of ‘sizeof’ to incomplete type ‘QResourcePrivate’ 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:59: error: creating array with negative size (‘-0x00000000000000001’) 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:60: error: invalid application of ‘sizeof’ to incomplete type ‘QResourcePrivate’ 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:60: error: creating array with negative size (‘-0x00000000000000001’) 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:62: warning: possible problem detected in invocation of delete operator: 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:54: warning: ‘pointer’ has incomplete type 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qresource.h:56: warning: forward declaration of ‘struct QResourcePrivate’ 
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Headers/qscopedpointer.h:62: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined. 

這是PyQt4的嘗試訪問的Qt4類的私有成員的錯誤?有人在Snow Leopard上成功編譯了PyQt4嗎?

回答

2

在我看到菲爾(PyQt的的維護者)has issued fixes昨日在專門爲雪豹發展快照的更新日誌:在64

2009/09/14 12點十二分49秒菲爾進一步 修復雪豹位 系統。添加了 QObject.pyqtConfigure()。

您是否使用昨天的PyQt版本?

This thread on the mailinglist也特別有趣。

PyQt編譯問題似乎是由雪豹默認的64位編譯以及它隨附的64/32位混合版本引起的。如果事情繼續出錯,我會將你的問題提交給這個郵件列表(這樣他們可以得到修復 - 希望),並試圖(暫時)以32位方式重建Qt和PyQt(可能是python)(與-m32編譯器標誌)如果你現在需要它的工作。

+0

是的,我從幾個小時前下載了開發快照。 – dzhelil 2009-09-15 20:52:17

0

您可能想從自制項目中使用PyQt:直接構建,託管依賴項。

在我的MBP Unibody上運行良好,全部64位。