[SOLVED] Conflict between <qopenglext.h> and ANGLE's <GLES2/gl2ext.h>
-
Hi all,
We have a Qt windows application linking to a proprietary OpenGL library. We want to migrate that library to OpenGL ES 2. We have updated the OpenGL headers from:@#include <gl/glew.h>
#include <gl/GLU.h>
#include <gl/glut.h>@To
@#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>@When we do this, we get some compiler error regarding redefinition of symbols in <qopenglext.h>. We do not include that header in our software (not in the app nor in the library).
@
D:\lib\QT\Qt5.4\5.4\msvc2013\include\QtGui\qopenglext.h:474: error: C2371: 'GLsizeiptr' : redefinition; different basic types
D:\lib\QT\Qt5.4\5.4\msvc2013\include\QtGui\qopenglext.h:475: error: C2371: 'GLintptr' : redefinition; different basic types
D:\lib\QT\Qt5.4\5.4\msvc2013\include\QtGui\qopenglext.h:2191: error: C2371: 'GLDEBUGPROC' : redefinition; different basic types
D:\lib\QT\Qt5.4\5.4\msvc2013\include\QtGui\qopenglext.h:474: error: C2371: 'GLsizeiptr' : redefinition; different basic types
D:\lib\QT\Qt5.4\5.4\msvc2013\include\QtGui\qopenglext.h:475: error: C2371: 'GLintptr' : redefinition; different basic types
D:\lib\QT\Qt5.4\5.4\msvc2013\include\QtGui\qopenglext.h:2191: error: C2371: 'GLDEBUGPROC' : redefinition; different basic types
@Any idea on how can we solve this?
Thanks in advance,
Robert. -
One thing I've noticed is that just selecting Qt-ANGLE kit from QtCreator, qmake automatically adds to the generated Makefiles the include files of Qt's ANGLES distribution.
But our RenderLibrary doesn't depend on Qt at all, so we probably'd want to get rid of those automatic includes, and use our owns instead.
Mainproject:
- RenderLibrary
- App (linking RenderLibrary)
Our RenderLibrary.pro just contains TEMPLATE = lib as template. The rest of the qmake commands are just to add sources, headers, and include paths.
¿Any idea?
Thanks,
Robert. -
Finally solved it by adding to the RenderLibrary pro file:
@QT -= core gui@Thanks!
Robert.