oglplus: Cannot detect OpenGL version.
Window 10 x64. MSVC 2015. Nvidia GTX 970m and Intel HD graphics 530.
As several other people have noted in the past, this error is still around:
Running configure.py with --debug-gl-ver-error
and --strict-gl-version-detection=0
produces:
-- Using GLFW3 for GL context initialization. -- Using GLEW as GL API library -- Detecting OpenGL version CMake Error at config/GLVer.cmake:71 (message): Error detecting GL version Call Stack (most recent call first): CMakeLists.txt:189 (include)
It then defaults to OpenGL 3.0 and all the examples fail to build.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 25 (11 by maintainers)
Sorry that it failed to work out of the box. When I’ll have some free time I’ll have a look at least at the 32-bit/64-bit issue and see if it cannot be detected and reported. Anyway if you want to try out OGLplus with your own applications you don’t need to build anything, it does work as a header-only library and you can setup the linking of GLEW (or some equivalent) and some GL-context-init library (GLFW,SDL,etc.) yourself manually.
Thumbs up. Yeah, linking on Windows especially with projects generated by cmake can be tricky.
Ok…If I simply copy-paste the glew32.dll into the debug folders before cmake scans them everything builds fine LOL. I can open the oglplus solution into VS and build everything 😛
It’s a hacky workaround, but I’m still at a bit of a loss as to what the actual problem is.
It’s strange that cmake didn’t add opengl32.lib to the list of libraries, either try copying it into the directory where glew32.lib is located or add the directory path (with opengl32.lib) to the command line options for
configure.py
(use the--library-dir PATH
option).OK, have a look at the project’s properties and see if there is opengl32.lib in the list of link libraries.
add the
--cmake -G 'Visual Studio 14 2015 Win64'
options for a 64-bit build,--cmake -G 'Visual Studio 14 2015'
for 32-bit, as the last options for theconfigure.py
scriptCould you
grep
(or something) the project files in the$_build/gl/
directory to see which one of them tries to build something likehas_GL_X_Y.cpp
(where X and Y are major and minor version numbers)? Then open that project and try to build and run it.