Building QT5 with OpenGL global namespace errors
I'm trying to build the latest QT5 with OpenGL support from source. I've followed the instructions here:
I've configured with configure -c++11 -developer-build -opensource -opengl desktop -nomake examples -nomake tests
and running nmake from the VS2012 x86 Native Tools Command Prompt.
I am getting errors related to OpenGL:
qopenglfunctions.h(593) : error C2039: 'glClearDepth' : is not a member of '`global namespace''
qopenglfunctions.h(593) : error C3861: 'glClearDepth' : identifier not found
qopenglfunctions.h(715) : error C2039: 'glDepthRange' : is not a member of '`global namespace''
qopenglfunctions.h(715) : error C3861: 'glDepthRange' : identifier not found
and also errors like kernel\qopenglcontext.cpp : error C2065: 'GL_PROXY_TEXTURE_2D' : undeclared identifier
GL_TEXTURE_WIDTH and glGetTexLevelParameteriv are also undeclared identifiers, similar to GL_PROXY_TEXTURE_2D.
Unfortunately I have searched this problem, but could not find a solution. The QT build is successful when I am not passing -opengl desktop to configure. Here is my graphics card and opengl version info:
GLEW version 1.9.0
Reporting capabilities of pixelformat 1
Running on a GeForce GT 540M/PCIe/SSE2 from NVIDIA Corporation
OpenGL version 4.2.0 is supported
If anyone can provide any pointers I would be grateful.
Hi. Hmm weird it should build fine with -opengl desktop. Which branch are you building from?
Those functions should be found inside of src/gui/opengl/qopenglext.h which gets included from qopengl.h which in turn should be included from qopenglfunctions.h.
Having the same trouble with the released version of 5.1.1, using Visual Studio 2012 x64. Any luck?