make qglviewer给出与QT相关的错误

时间:2014-03-07 15:26:29

标签: qt qglviewer

我想安装libQGLViewer,我是从http://www.libqglviewer.com/download.html在Ubuntu 10.04上下载的。根据我要做的手册;

1)cd QGLViewer /

2)qmake

3)制作

通过输入make来编译库几乎立即以错误结束;

`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
`

这种情况持续了一段时间并以:

结束
`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$ 
`

我认为这是因为找不到QT库。但是我使用http://qt-project.org/downloads的最新下载安装了QT 5.2。

Makefile是否找不到库路径?如果是这样,我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

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