首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用Qt 5.0.2编译Openscenegraph 3.1.8

用Qt 5.0.2编译Openscenegraph 3.1.8
EN

Stack Overflow用户
提问于 2013-07-05 17:10:58
回答 1查看 873关注 0票数 1

在Windows7 (basic)上使用cmake 2.8.11进行配置之后,我正在尝试用Qt 5.0.2使用mingw-32编译器编译openscenegraph-3.1.8。

但是,在编译过程中,我得到了以下错误:

代码语言:javascript
复制
In file included from C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtGui/qopengl.h:55:0,
                 from C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtOpenGL/qgl.h:47,
                 from C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtOpenGL/QGLWidget:1,
                 from C:/OpenSceneGraph-3.1.8/include/osgQt/GraphicsWindowQt:24,
                 from C:\OpenSceneGraph-3.1.8\src\osgQt\GraphicsWindowQt.cpp:15:
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/GLES2/gl2.h:38:26: error: conflicting declaration 'typedef khronos_intptr_t GLintptr'
In file included from C:/OpenSceneGraph-3.1.8/include/osg/Array:34:0,
                 from C:/OpenSceneGraph-3.1.8/include/osg/Uniform:23,
                 from C:/OpenSceneGraph-3.1.8/include/osg/StateSet:20,
                 from C:/OpenSceneGraph-3.1.8/include/osg/State:18,
                 from C:/OpenSceneGraph-3.1.8/include/osg/GraphicsContext:17,
                 from C:/OpenSceneGraph-3.1.8/include/osgViewer/GraphicsWindow:17,
                 from C:/OpenSceneGraph-3.1.8/include/osgQt/GraphicsWindowQt:17,
                 from C:\OpenSceneGraph-3.1.8\src\osgQt\GraphicsWindowQt.cpp:15:
C:/OpenSceneGraph-3.1.8/include/osg/BufferObject:47:21: error: 'GLintptr' has a previous declaration as 'typedef int GLintptr'
In file included from C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtGui/qopengl.h:55:0,
                 from C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtOpenGL/qgl.h:47,
                 from C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtOpenGL/QGLWidget:1,
                 from C:/OpenSceneGraph-3.1.8/include/osgQt/GraphicsWindowQt:24,
                 from C:\OpenSceneGraph-3.1.8\src\osgQt\GraphicsWindowQt.cpp:15:
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/GLES2/gl2.h:39:26: error: conflicting declaration 'typedef khronos_ssize_t GLsizeiptr'
In file included from C:/OpenSceneGraph-3.1.8/include/osg/Array:34:0,
                 from C:/OpenSceneGraph-3.1.8/include/osg/Uniform:23,
                 from C:/OpenSceneGraph-3.1.8/include/osg/StateSet:20,
                 from C:/OpenSceneGraph-3.1.8/include/osg/State:18,  
                 from C:/OpenSceneGraph-3.1.8/include/osg/GraphicsContext:17,
                 from C:/OpenSceneGraph-3.1.8/include/osgViewer/GraphicsWindow:17,
                 from C:/OpenSceneGraph-3.1.8/include/osgQt/GraphicsWindowQt:17,
                 from C:\OpenSceneGraph-3.1.8\src\osgQt\GraphicsWindowQt.cpp:15:
C:/OpenSceneGraph-3.1.8/include/osg/BufferObject:48:21: error: 'GLsizeiptr' has a previous declaration as 'typedef int GLsizeiptr'
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-07-11 21:20:23

看起来您正在使用不同版本的OSG2和OpenGL构建QT -请参阅重建QT的链接:http://www.qtforum.org/article/39175/opengl-with-qt-5-0-1-and-glew.html

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

https://stackoverflow.com/questions/17485184

复制
相关文章

相似问题

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