Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

Microsoft Compiler does not recognize #warning (specifically in qglfunctions.h)

$
0
0
I’m hoping that an existing Qt developer will be willing to submit the following patch so that a warning can be issued by any Microsoft C++ compiler, instead of an error about an unrecognized preprocessor command. This is regarding 4.8, but may also apply to 5.x. diff --git a/src/opengl/qglfunctions.h b/src/opengl/qglfunctions.h index e142b1e..fce919e 100644 --- a/src/opengl/qglfunctions.h +++ b/src/opengl/qglfunctions.h @@ -43,9 +43,14 @@  #define QGLFUNCTIONS_H    #ifdef __GLEW_H__ +#ifdef _MSC_VER +#pragma message (__FILE__ ": qglfunctions.h is not compatible with GLEW, GLEW defines will be undefined") +#pragma message (__FILE__ ": To use GLEW with Qt, do not include <QtOpenGL> or <QGLFunctions> after glew.h") +#else  #warning qglfunctions.h is not compatible with GLEW, GLEW defines will be undefined  #warning To use GLEW with Qt, do not include <QtOpenGL> or <QGLFunctions> after glew.h  #endif +#endif    #include <QtOpenGL/qgl.h>  

Viewing all articles
Browse latest Browse all 2113

Trending Articles