Only MinGW compiles OpenGL project with GLEW
-
I try to setup Qt (5.1) for GUI in my OpenGL renderer.I linked it with GLEW 1.10.Here is how the .pro file looks like :
@#-------------------------------------------------
Project created by QtCreator 2013-09-15T10:07:27
#-------------------------------------------------
QT += core gui opengl
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = GPUMemstat
TEMPLATE = app
CONFIG += consoleSOURCES += main.cpp
mainwindow.cpp
mywidget.cpp
gpugui.cpp
gpunvidia.cpp
nvmlstats.cppHEADERS += mainwindow.h
mywidget.h
gpugui.h
gpunvidia.h
nvmlstats.hFORMS += mainwindow.ui
gpugui.uiwin32: LIBS += -L$$PWD/../../../../../Documents/OpenGL_Stuff/glew-1.10.0/lib/Release/Win32/ -lglew32
INCLUDEPATH += $$PWD/../../../../../Documents/OpenGL_Stuff/glew-1.10.0/include
DEPENDPATH += $$PWD/../../../../../Documents/OpenGL_Stuff/glew-1.10.0/includewin32: LIBS += -L$$PWD/../../../../../Documents/OpenGL_Stuff/R313-developer/x86/ -lnvapi
INCLUDEPATH += $$PWD/../../../../../Documents/OpenGL_Stuff/R313-developer
DEPENDPATH += $$PWD/../../../../../Documents/OpenGL_Stuff/R313-developerwin32: PRE_TARGETDEPS += $$PWD/../../../../../Documents/OpenGL_Stuff/R313-developer/x86/nvapi.lib
win32: LIBS += -L$$PWD/../../../../../Documents/OpenGL_Stuff/tdk_5.320.68/nvml/lib/ -lnvml
INCLUDEPATH += $$PWD/../../../../../Documents/OpenGL_Stuff/tdk_5.320.68/nvml/include
DEPENDPATH += $$PWD/../../../../../Documents/OpenGL_Stuff/tdk_5.320.68/nvml/includewin32: PRE_TARGETDEPS += $$PWD/../../../../../Documents/OpenGL_Stuff/tdk_5.320.68/nvml/lib/nvml.lib@
I have VC2010 ,VC2012 and MinGW compilers.With MinGW compiler set it compiler and runs fine.But with any other I am getting tons of errors in qopengles2ext.h
Some of the errors:
E:\Qt\5.1.0\msvc2010\include\QtGui\qopengles2ext.h:402: error: C2146: syntax error : missing ';' before identifier 'GLint64'
E:\Qt\5.1.0\msvc2010\include\QtGui\qopengles2ext.h:402: error: C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Qt\5.1.0\msvc2010\include\QtGui\qopengles2ext.h:403: error: C2146: syntax error : missing ';' before identifier 'GLuint64'....
How do I disable qopengles2ext.h header parse.As I understand it is needed only if I want to use Qt's OpenGL .