This is my context : I'm compiling a graphic engine using OpenGL on windows, so I included glext.h. Surprise, it is conflicting with gl2.h from Qt5 ..
I have found that gl2.h (from gles2) is included if QT_OPENGL_ES_2 is defined.. then I found that QT_OPENGL_ES_2 is defined by default and I can't define QT_NO_OPENGL_ES_2 ... or maybe i don't understand how the following code is supposed to work (btw every block in my qconfig.h - the one from Qt5 msvc10 offline installer - looks like that) :
#if defined(QT_OPENGL_ES_2) && defined(QT_NO_OPENGL_ES_2)
# undef QT_OPENGL_ES_2
#elif !defined(QT_OPENGL_ES_2)
# define QT_OPENGL_ES_2
#endif
Maybe it is because i have not slept much but it seems weird. But in the case QT_OPENGL_ES_2 is not defined and QT_NO_OPENGL_ES_2 is defined, I'm pretty sure (with my 4 not sleeping neurones) that it goes in the second branch and defines QT_OPENGL_ES_2 ...
I would have written if I were them :
#if defined(QT_OPENGL_ES_2) && defined(QT_NO_OPENGL_ES_2)
# undef QT_OPENGL_ES_2
#elif !defined(QT_OPENGL_ES_2) && !defined(QT_NO_OPENGL_ES_2)
# define QT_OPENGL_ES_2
#endif
Thank you for your time :)