1

I'm trying to compile openscenegraph-3.1.8 with Qt 5.0.2 using mingw-32 compiler after configuring with cmake 2.8.11 on windows 7 (basic).

But, in the compilation process i got the following errors :-

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'
genpfault
  • 51,148
  • 11
  • 85
  • 139
Lokesh Kumar
  • 682
  • 2
  • 8
  • 27

1 Answers1

1

Looks like you are building QT against OpenGL 2 and OSG with a different version - see link for rebuilding QT: http://www.qtforum.org/article/39175/opengl-with-qt-5-0-1-and-glew.html

Ruan Caiman
  • 881
  • 5
  • 5