首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Qt C++:qglviewer未在Mac 10.7.2上编译

Qt C++:qglviewer未在Mac 10.7.2上编译
EN

Stack Overflow用户
提问于 2012-02-14 23:28:12
回答 1查看 1.2K关注 0票数 2

我试图在MacOSX10.7.2上编译基于QT C++ opengl的代码,但它无法找到qglviewer.h文件。

这是我在编译代码时得到的错误。

代码语言:javascript
复制
In file included from src/GLViewer.cc:12: src/GLViewer.h:22:23: error:  
qglviewer.h: No such file or directory In file included from  
src/GLViewer.cc:12: src/GLViewer.h:27: error: expected class-name  
before ‘{’ token src/GLViewer.cc: In constructor  
‘GLViewer::GLViewer(QWidget*)’: src/GLViewer.cc:28: error: class  
‘GLViewer’ does not have any field named ‘QGLViewer’  
src/GLViewer.cc:36: error: ‘camera’ was not declared in this scope  
src/GLViewer.cc: In member function ‘void GLViewer::resetView()’:  
src/GLViewer.cc:48: error: ‘setSceneRadius’ was not declared in this  
scope src/GLViewer.cc:49: error: ‘qglviewer’ has not been declared  
src/GLViewer.cc:49: error: ‘setSceneCenter’ was not declared in this  
scope src/GLViewer.cc:50: error: ‘camera’ was not declared in this  
scope src/GLViewer.cc:55: error: ‘showEntireScene’ was not declared in  
this scope src/GLViewer.cc: In member function ‘void  
GLViewer::setScene(Scene*)’: src/GLViewer.cc:70: error:  
‘initFromDOMElement’ was not declared in this scope src/GLViewer.cc:  
In member function ‘virtual void GLViewer::resizeGL(int, int)’:  
src/GLViewer.cc:89: error: ‘QGLViewer’ has not been declared  
src/GLViewer.cc: In member function ‘virtual void GLViewer::draw()’:  
src/GLViewer.cc:128: error: ‘camera’ was not declared in this scope  
src/GLViewer.cc:134: error: ‘qglviewer’ has not been declared  
src/GLViewer.cc:134: error: expected `;' before ‘cameraPos’  
src/GLViewer.cc:135: error: ‘cameraPos’ was not declared in this scope  
make[2]: \*\*\* [release/GLViewer.o] Error 1 make[1]: \*\*\* [release] Error  
2 make: \*\* [sub-qviewer-make_default-ordered] Error 2  
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-03-04 01:28:49

最后,我联系了QGLViewer开发人员,他们已经解决了这个问题。请按照此链接上提供的说明进行安装:http://www.libqglviewer.com/index.html

请关注上面的libQGLViewer2.3.14版本发布

要编译您自己的QGLViewer项目,请访问以下链接:http://www.libqglviewer.com/compilation.html#pro

它解释了如何创建自己的.pro file来生成Makefile

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9279556

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档