I am trying to convert my Qt4 project to Qt5. It uses OpenGL and works fine on 2008/Qt4.8.4. Please note, that I am retyping in the errors listed and not copying pasting and full code is NOT available.
- I have recompiled Qt 5.0.1 (sucessfully) using the "-opengl desktop" flag
- Installed the Visual Studio 2012 Add-in
When I compile my code I get the following error:
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\GL/gl.h(60): error C2371: 'GLdouble' : redefinition; different basic types
1> c:\qt\qt-everywhere-opensource-src-5.0.1\qtbase\include\qtgui\../../src/gui/opengl/qopengl.h(71) : see declaration of 'GLdouble'
if I replace the
#include <GL/gl.h>
#include <GL/gl.h>
To copy to clipboard, switch view to plain text mode
with
#include <qopengl.h>
#include <qopengl.h>
To copy to clipboard, switch view to plain text mode
or
#include <qgl.h>
#include <qgl.h>
To copy to clipboard, switch view to plain text mode
I get GL_PROJECTION macro not found errors and the redefinition errors are gone. I "should" not be using the OpenGL ES due to the -opengl desktop flag. Any help would be GREATLY appricated!
[EDITED:] Also, this is using a QGLWidget and not QWindow.
Bookmarks