运行QtopenGL时出现的错误,望高人指点,谢谢!

OOo,TeX,KO,ABI,GIMP,Picasa,ProE,QCAD,Inkscape,Kicad,Eagle
回复
trice
帖子: 2
注册时间: 2009-04-09 18:24

运行QtopenGL时出现的错误,望高人指点,谢谢!

#1

帖子 trice » 2009-04-09 19:11

trice@trice-desktop:~/桌面/ebook2/qt-book/chap20/tetrahedron$ qmake tetrahedron.pro
trice@trice-desktop:~/桌面/ebook2/qt-book/chap20/tetrahedron$ make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I. -I/usr/X11R6/include -I. -I. -o main.o main.cpp
In file included from main.cpp:5:
tetrahedron.h:5:20: error: QtOpenGL: No such file or directory
tetrahedron.h:6:21: error: QGLWidget: No such file or directory
In file included from main.cpp:5:
tetrahedron.h:9: error: expected class-name before ‘{’ token
tetrahedron.h:27: error: ‘GLfloat’ does not name a type
tetrahedron.h:28: error: ‘GLfloat’ does not name a type
tetrahedron.h:29: error: ‘GLfloat’ does not name a type
main.cpp: In function ‘int main(int, char**)’:
main.cpp:11: error: ‘QGLFormat’ has not been declared
main.cpp:17: error: ‘class Tetrahedron’ has no member named ‘setWindowTitle’
main.cpp:18: error: ‘class Tetrahedron’ has no member named ‘resize’
main.cpp:19: error: ‘class Tetrahedron’ has no member named ‘show’
make: *** [main.o] Error 1
trice
帖子: 2
注册时间: 2009-04-09 18:24

Re: 运行QtopenGL时出现的错误,望高人指点,谢谢!

#2

帖子 trice » 2009-04-09 19:41

我在qmake的工程文件爱你中加入了
QT += opengl
可是还是不行,错误一样的!
回复