1

I want to install libQGLViewer, which I downloaded from http://www.libqglviewer.com/download.html on Ubuntu 10.04. According to the manual I have to do;

1) cd QGLViewer/

2) qmake

3) make

Compiling the library by typing make almost immediately ends in error however;

`c++ -c -pipe -Wall -W -Os -fPIC  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/macx-g++ -I. -I/usr/include/qt3 -I/System/Library/Frameworks/OpenGL.framework/Headers -I/System/Library/Frameworks/AGL.framework/Headers/ -I.moc/ -o .obj/qglviewer.o qglviewer.cpp
In file included from domUtils.h:23,
                 from qglviewer.cpp:23:
config.h:77:22: error: QGLWidget: No such file or directory
config.h:88:17: error: QList: No such file or directory
config.h:89:19: error: QVector: No such file or directory
In file included from qglviewer.cpp:23:
domUtils.h:25:23: error: QDomElement: No such file or directory
domUtils.h:26:19: error: QString: No such file or directory
domUtils.h:27:23: error: QStringList: No such file or directory
domUtils.h:28:18: error: QColor: No such file or directory
`

this goes on for a while and ends in:

`qglviewer.cpp:841: error: ‘height’ was not declared in this scope
qglviewer.cpp: At global scope:
qglviewer.cpp:864: error: variable or field ‘timerEvent’ declared void
qglviewer.cpp:864: error: ‘QTimerEvent’ was not declared in this scope
qglviewer.cpp:864: error: expected primary-expression before ‘)’ token
make: *** [.obj/qglviewer.o] Error 1
rcar@DUD3642RCAR:~/Downloads/libQGLViewer-2.5.1/QGLViewer$ 
`

I think this is because it cannot find the QT library. But I have installed QT 5.2 using the latest download from http://qt-project.org/downloads.

Could it be the Makefile just can not locate the library path? And if so I how do I mend this?

4

1 回答 1

1

解决了!我为此错过了 qtcreator;sudo apt-get install qtcreator 我还需要升级到 Ubuntu 12.04,因为在 10.04 上这个问题仍然存在。

于 2014-03-10T17:22:14.113 回答