2011-04-27 112 views
0

我試圖按照http://doc.qt.nokia.com/qt3d-snapshot/qt3d-building.html#installing-plugins編譯qt3d在Ubuntu

所有的編譯過程中它貼在後:

[email protected]:~/build/qt-labs/qt3d$ make 
cd src/ && make -f Makefile 
make[1]: Entering directory `/home/fabio/build/qt-labs/qt3d/src' 
cd threed/ && make -f Makefile 
make[2]: Entering directory `/home/fabio/build/qt-labs/qt3d/src/threed' 
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_BUILD_QT3D_LIB -DQT_NO_EGL -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt/mkspecs/linux-g++-64 -I/home/fabio/depot/qt-labs/qt3d/src/threed -I/opt/qt/include/QtCore -I/opt/qt/include/QtNetwork -I/opt/qt/include/QtGui -I/opt/qt/include/QtOpenGL -I/opt/qt/include -I/home/fabio/depot/qt-labs/qt3d/src/threed/global -I/home/fabio/depot/qt-labs/qt3d/src/threed/painting -I/home/fabio/depot/qt-labs/qt3d/src/threed/arrays -I/home/fabio/depot/qt-labs/qt3d/src/threed/effects -I/home/fabio/depot/qt-labs/qt3d/src/threed/materials -I/home/fabio/depot/qt-labs/qt3d/src/threed/geometry -I/home/fabio/depot/qt-labs/qt3d/src/threed/viewing -I/home/fabio/depot/qt-labs/qt3d/src/threed/math3d -I/home/fabio/depot/qt-labs/qt3d/src/threed/scene -I/home/fabio/depot/qt-labs/qt3d/src/threed/graphicsview -I/home/fabio/depot/qt-labs/qt3d/src/threed/textures -I/home/fabio/depot/qt-labs/qt3d/src/threed/surfaces -I/home/fabio/depot/qt-labs/qt3d/src/threed/api -I/usr/X11R6/include -I. -I/home/fabio/depot/qt-labs/qt3d/src/threed -I. -o qglabstracteffect.o /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.cpp 
In file included from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglpainter.h:47:0, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.h:45, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.cpp:42: 
/opt/qt/include/QtGui/qvector2d.h: In function ‘bool operator==(const QVector2D&, const QVector2D&)’: 
/opt/qt/include/QtGui/qvector2d.h:184:24: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector2d.h:184:42: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector2d.h: In function ‘bool operator!=(const QVector2D&, const QVector2D&)’: 
/opt/qt/include/QtGui/qvector2d.h:189:24: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector2d.h:189:42: warning: comparing floating point with == or != is unsafe 
In file included from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglpainter.h:48:0, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.h:45, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.cpp:42: 
/opt/qt/include/QtGui/qvector3d.h: In function ‘bool operator==(const QVector3D&, const QVector3D&)’: 
/opt/qt/include/QtGui/qvector3d.h:210:24: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector3d.h:210:42: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector3d.h:210:60: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector3d.h: In function ‘bool operator!=(const QVector3D&, const QVector3D&)’: 
/opt/qt/include/QtGui/qvector3d.h:215:24: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector3d.h:215:42: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector3d.h:215:60: warning: comparing floating point with == or != is unsafe 
In file included from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglpainter.h:49:0, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.h:45, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.cpp:42: 
/opt/qt/include/QtGui/qvector4d.h: In function ‘bool operator==(const QVector4D&, const QVector4D&)’: 
/opt/qt/include/QtGui/qvector4d.h:214:24: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector4d.h:214:42: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector4d.h:214:60: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector4d.h:214:78: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector4d.h: In function ‘bool operator!=(const QVector4D&, const QVector4D&)’: 
/opt/qt/include/QtGui/qvector4d.h:219:24: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector4d.h:219:42: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector4d.h:219:60: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qvector4d.h:219:78: warning: comparing floating point with == or != is unsafe 
In file included from /opt/qt/include/QtGui/qmatrix4x4.h:47:0, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglpainter.h:50, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.h:45, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.cpp:42: 
/opt/qt/include/QtGui/qquaternion.h: In member function ‘bool QQuaternion::isIdentity() const’: 
/opt/qt/include/QtGui/qquaternion.h:154:63: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qquaternion.h: In function ‘bool operator==(const QQuaternion&, const QQuaternion&)’: 
/opt/qt/include/QtGui/qquaternion.h:239:24: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qquaternion.h:239:42: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qquaternion.h:239:60: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qquaternion.h:239:78: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qquaternion.h: In function ‘bool operator!=(const QQuaternion&, const QQuaternion&)’: 
/opt/qt/include/QtGui/qquaternion.h:244:24: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qquaternion.h:244:42: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qquaternion.h:244:60: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qquaternion.h:244:78: warning: comparing floating point with == or != is unsafe 
In file included from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglpainter.h:50:0, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.h:45, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.cpp:42: 
/opt/qt/include/QtGui/qmatrix4x4.h: In member function ‘bool QMatrix4x4::isIdentity() const’: 
/opt/qt/include/QtGui/qmatrix4x4.h:309:20: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:309:39: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:309:58: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:311:20: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:311:39: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:311:58: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:313:20: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:313:39: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:313:58: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:315:20: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:315:39: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:315:58: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:317:20: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:317:39: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:317:58: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:319:24: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h: In member function ‘bool QMatrix4x4::operator==(const QMatrix4x4&) const’: 
/opt/qt/include/QtGui/qmatrix4x4.h:445:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:446:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:447:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:448:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:449:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:450:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:451:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:452:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:453:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:454:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:455:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:456:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:457:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:458:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:459:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:460:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h: In member function ‘bool QMatrix4x4::operator!=(const QMatrix4x4&) const’: 
/opt/qt/include/QtGui/qmatrix4x4.h:465:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:466:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:467:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:468:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:469:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:470:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:471:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:472:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:473:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:474:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:475:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:476:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:477:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:478:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:479:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h:480:35: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h: In function ‘QVector3D operator*(const QVector3D&, const QMatrix4x4&)’: 
/opt/qt/include/QtGui/qmatrix4x4.h:623:14: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h: In function ‘QVector3D operator*(const QMatrix4x4&, const QVector3D&)’: 
/opt/qt/include/QtGui/qmatrix4x4.h:648:14: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h: In function ‘QPoint operator*(const QPoint&, const QMatrix4x4&)’: 
/opt/qt/include/QtGui/qmatrix4x4.h:719:14: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h: In function ‘QPointF operator*(const QPointF&, const QMatrix4x4&)’: 
/opt/qt/include/QtGui/qmatrix4x4.h:740:14: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h: In function ‘QPoint operator*(const QMatrix4x4&, const QPoint&)’: 
/opt/qt/include/QtGui/qmatrix4x4.h:762:14: warning: comparing floating point with == or != is unsafe 
/opt/qt/include/QtGui/qmatrix4x4.h: In function ‘QPointF operator*(const QMatrix4x4&, const QPointF&)’: 
/opt/qt/include/QtGui/qmatrix4x4.h:783:14: warning: comparing floating point with == or != is unsafe 
In file included from /home/fabio/depot/qt-labs/qt3d/src/threed/math3d/qbox3d.h:46:0, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglpainter.h:51, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.h:45, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.cpp:42: 
/home/fabio/depot/qt-labs/qt3d/src/threed/math3d/qray3d.h: In member function ‘void QRay3D::transform(const QMatrix4x4&)’: 
/home/fabio/depot/qt-labs/qt3d/src/threed/math3d/qray3d.h:125:26: error: ‘const class QMatrix4x4’ has no member named ‘mapVector’ 
/home/fabio/depot/qt-labs/qt3d/src/threed/math3d/qray3d.h: In member function ‘QRay3D QRay3D::transformed(const QMatrix4x4&) const’: 
/home/fabio/depot/qt-labs/qt3d/src/threed/math3d/qray3d.h:130:45: error: ‘const class QMatrix4x4’ has no member named ‘mapVector’ 
In file included from /home/fabio/depot/qt-labs/qt3d/src/threed/arrays/qcustomdataarray.h:45:0, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/arrays/qglvertexbundle.h:46, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglpainter.h:53, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.h:45, 
       from /home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.cpp:42: 
/home/fabio/depot/qt-labs/qt3d/src/threed/arrays/qarray.h: In member function ‘QArray<T, PreallocSize>::Data* QArray<T, PreallocSize>::copyData(const T*, int, int)’: 
/home/fabio/depot/qt-labs/qt3d/src/threed/arrays/qarray.h:384:5: error: ‘QT_TRY’ was not declared in this scope 
/home/fabio/depot/qt-labs/qt3d/src/threed/arrays/qarray.h:384:12: error: expected ‘;’ before ‘{’ token 
/home/fabio/depot/qt-labs/qt3d/src/threed/painting/qglabstracteffect.cpp:127:1: error: expected ‘}’ at end of input 
make[2]: *** [qglabstracteffect.o] Error 1 
make[2]: Leaving directory `/home/fabio/build/qt-labs/qt3d/src/threed' 
make[1]: *** [sub-threed-make_default-ordered] Error 2 
make[1]: Leaving directory `/home/fabio/build/qt-labs/qt3d/src' 
make: *** [sub-src-make_default-ordered] Error 2 

我怎樣才能編譯它? 有辦法找到ubuntu的二進制和-dev版本?

也許是64位體系結構?

+0

你是否按照Qt3D頁面的說明先編譯Qt? – 2011-04-27 13:54:09

+0

當然我也遵循同樣的目錄結構,使用./configure -opengl – 2011-04-27 14:27:15

+0

編譯的qt你不需要編譯Qt本身。只要確保你安裝的Qt版本是4.8或以上 – 2012-04-24 17:25:28

回答

0

我建議使用stable public branch而不是老的實驗室分支。該實驗室的分支尚未維持一段時間。在你做任何事之前,去獲取最新的穩定來源。

說了上面的問題看起來像是Qt 4的一些問題。通常我會推薦使用最新的Qt SDK - 內置Qt 4.7。但是它的下載量很大。

如果你是在Linux上,尤其是當它像Ubuntu清醒最近的版本,它可以得到的Qt 4.7 - 然後嘗試:

apt-get build-dep qt4-qmake 

在例如Ubuntu的清醒應該讓所有的依賴,包括了Qt 4.7的發展圖書館,這將節省您建立Qt。然後,只需執行qmake quick3d.pro即可使用已安裝的系統qt。

如果你真的想建立QT(也許你有一個需要能夠把qDebug()中的Qt庫報表),那麼你可以使用源從Qt的下載頁面,或從gitorious得到它們。然後按照構建線(如在構建文檔中描述):

/path/to/qt/configure -developer-build -no-qt3support -no-webkit -no-xmlpatterns \ 
    -no-phonon -opengl -declarative -nomake demos -nomake examples 

Qt3D得到在64位定期進行測試,以便不應該是一個問題。

0

我有同樣的問題。你需要有4.8版本的Qt。 Ubuntu版本庫中的Qt的當前版本是4.7.4。我解決了這個問題,通過增加KDE反向移植(PPA),其中包括libqt4-dev:4.8.1你應該做的:

sudo add-apt-repository ppa:kubuntu-ppa/backports 
sudo apt-get update 
sudo apt-get install libqt4-dev 

我目前正在對其進行編譯precise中;)

請注意,精確的穿山甲,將上升的日子明天之後。她的倉庫裏有Qt 4.8.1。