Closed htmlboss closed 7 years ago
Could you please add the --debug-config
option, and when the detection fails go to the build dir and try to manually build the target which cmake uses to detect the GL version, and paste here the error messages. At the moment I don't have any Win10 machine with MSVC so I cannot test this.
build the target which cmake uses to detect the GL version.
What's the name of the target?
When I open the generated solution file and BUILD_ALL, oglplus builds successfully, but all the examples fail with resolved_external_symbol errors (seems to be pointing at GLEW).
It's generated by CMake try_compile or try_run so AFAIK the target-name is partially random, but it probably has has_GL_X_Y*
in its name. Look somewhere around the $build_dir/gl/CMakeFiles/CMakeTmp
for a msvc solution or project.
Found it! It was called CMAKE_TRY_COMPILE...and evidently it compiled successfully. Also, is there a way for me to build this as x64?
1>------ Build started: Project: cmTC_c44ba, Configuration: Debug Win32 ------
1> Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> cl /c /I"C:\Program Files (x86)\Visual Leak Detector\include" /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_c44ba.dir\Debug\\" /Fd"cmTC_c44ba.dir\Debug\vc140.pdb" /Gd /TP /analyze- /errorReport:prompt C:\Users\Nabil\Documents\GitHub\oglplus\_build\CMakeFiles\feature_tests.cxx
1>
1> feature_tests.cxx
1> cmTC_c44ba.vcxproj -> C:\Users\Nabil\Documents\GitHub\oglplus\_build\CMakeFiles\CMakeTmp\Debug\cmTC_c44ba.exe
2>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Projects build report:
Status | Project [Config|platform]
-----------|---------------------------------------------------------------------------------------------------
Succeeded | cmTC_c44ba.vcxproj [Debug|Win32]
Succeeded | ALL_BUILD.vcxproj [Debug|Win32]
Time Elapsed 00:00:01.781
Ok, now try running the built .exe
Ran it in a cmd shell, and no output.
Hmm, I just noticed that the path is ...\_build\CMakeFiles\CMakeTmp\Debug\cmTC_c44ba.exe
so this is probably some different try_compile check.
The GL version check should be in ...\_build\gl\CMakeFiles\CMakeTmp
, note the /gl/ in the path.
The Solution only contains one project (cmTC_549d3) which compiles fine and executes without output. The containing folder contains tons of other projects though.
Could you grep
(or something) the project files in the $_build/gl/
directory to see which one of them tries to build something like has_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.
Found the file for OpenGL 4.0.
1>------ Build started: Project: cmTC_5b09a, Configuration: Debug Win32 ------
1> Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> cl /c /I"C:\OpenGL-Deps\GLEW-2.0\include" /IC:\Users\Nabil\Documents\GitHub\oglplus\include /IC:\Users\Nabil\Documents\GitHub\oglplus\implement /IC:\Users\Nabil\Documents\GitHub\oglplus\utils /IC:\Users\Nabil\Documents\GitHub\oglplus\_build\include /I"C:\OpenGL-Deps\GLFW3\include" /I"C:\Program Files (x86)\Visual Leak Detector\include" /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_5b09a.dir\Debug\\" /Fd"cmTC_5b09a.dir\Debug\vc140.pdb" /Gd /TP /analyze- /errorReport:prompt C:\Users\Nabil\Documents\GitHub\oglplus\_build\gl\has_GL_4_0.cpp
1>
1> has_GL_4_0.cpp
1>has_GL_4_0.obj : error LNK2019: unresolved external symbol __imp__glGetError@0 referenced in function "public: __thiscall oglplus::GLAPIInitializer::GLAPIInitializer(int,int)" (??0GLAPIInitializer@oglplus@@QAE@HH@Z)
1>has_GL_4_0.obj : error LNK2019: unresolved external symbol __imp__glGetIntegerv@8 referenced in function "bool __cdecl do_query_gl(void)" (?do_query_gl@@YA_NXZ)
1>has_GL_4_0.obj : error LNK2019: unresolved external symbol __imp__glewInit@0 referenced in function "public: __thiscall oglplus::GLAPIInitializer::GLAPIInitializer(int,int)" (??0GLAPIInitializer@oglplus@@QAE@HH@Z)
1>has_GL_4_0.obj : error LNK2019: unresolved external symbol _glfwInit referenced in function "bool __cdecl query_gl_GLFW3(void)" (?query_gl_GLFW3@@YA_NXZ)
1>has_GL_4_0.obj : error LNK2019: unresolved external symbol _glfwTerminate referenced in function "bool __cdecl query_gl_GLFW3(void)" (?query_gl_GLFW3@@YA_NXZ)
1>has_GL_4_0.obj : error LNK2019: unresolved external symbol _glfwCreateWindow referenced in function "bool __cdecl query_gl_GLFW3(void)" (?query_gl_GLFW3@@YA_NXZ)
1>has_GL_4_0.obj : error LNK2019: unresolved external symbol _glfwMakeContextCurrent referenced in function "bool __cdecl query_gl_GLFW3(void)" (?query_gl_GLFW3@@YA_NXZ)
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBeginConditionalRender
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBeginTransformFeedback
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBindFragDataLocation
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewClampColor
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewClearBufferfi
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewClearBufferfv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewClearBufferiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewClearBufferuiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewColorMaski
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewDisablei
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewEnablei
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewEndConditionalRender
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewEndTransformFeedback
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetBooleani_v
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetFragDataLocation
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetStringi
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetTexParameterIiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetTexParameterIuiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetTransformFeedbackVarying
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetUniformuiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetVertexAttribIiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetVertexAttribIuiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewIsEnabledi
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewTexParameterIiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewTexParameterIuiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewTransformFeedbackVaryings
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform1ui
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform1uiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform2ui
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform2uiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform3ui
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform3uiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform4ui
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform4uiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI1i
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI1iv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI1ui
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI1uiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI2i
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI2iv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI2ui
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI2uiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI3i
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI3iv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI3ui
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI3uiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI4bv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI4i
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI4iv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI4sv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI4ubv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI4ui
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI4uiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribI4usv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribIPointer
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBlendEquationSeparatei
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBlendEquationi
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBlendFuncSeparatei
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBlendFunci
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewMinSampleShading
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewDrawArraysIndirect
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewDrawElementsIndirect
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBindFramebuffer
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBindRenderbuffer
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBlitFramebuffer
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewCheckFramebufferStatus
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewDeleteFramebuffers
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewDeleteRenderbuffers
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewFramebufferRenderbuffer
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewFramebufferTexture1D
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewFramebufferTexture2D
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewFramebufferTexture3D
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewFramebufferTextureLayer
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGenFramebuffers
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGenRenderbuffers
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGenerateMipmap
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetFramebufferAttachmentParameteriv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetRenderbufferParameteriv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewIsFramebuffer
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewIsRenderbuffer
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewRenderbufferStorage
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewRenderbufferStorageMultisample
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetUniformdv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform1d
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform1dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform2d
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform2dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform3d
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform3dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform4d
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniform4dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniformMatrix2dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniformMatrix2x3dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniformMatrix2x4dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniformMatrix3dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniformMatrix3x2dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniformMatrix3x4dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniformMatrix4dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniformMatrix4x2dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniformMatrix4x3dv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewFlushMappedBufferRange
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewMapBufferRange
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetActiveSubroutineName
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetActiveSubroutineUniformName
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetActiveSubroutineUniformiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetProgramStageiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetSubroutineIndex
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetSubroutineUniformLocation
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetUniformSubroutineuiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewUniformSubroutinesuiv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewPatchParameterfv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewPatchParameteri
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBindTransformFeedback
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewDeleteTransformFeedbacks
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewDrawTransformFeedback
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGenTransformFeedbacks
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewIsTransformFeedback
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewPauseTransformFeedback
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewResumeTransformFeedback
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBeginQueryIndexed
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewDrawTransformFeedbackStream
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewEndQueryIndexed
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetQueryIndexediv
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBindBufferBase
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBindBufferRange
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGetIntegeri_v
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewBindVertexArray
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewDeleteVertexArrays
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewGenVertexArrays
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp____glewIsVertexArray
1>has_GL_4_0.obj : error LNK2001: unresolved external symbol __imp__glewExperimental
1>C:\OpenGL-Deps\GLEW-2.0\glew32.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86'
1>C:\OpenGL-Deps\GLFW3\glfw3.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86'
1>C:\Users\Nabil\Documents\GitHub\oglplus\_build\gl\CMakeFiles\CMakeTmp\Debug\cmTC_5b09a.exe : fatal error LNK1120: 138 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Projects build report:
Status | Project [Config|platform]
-----------|---------------------------------------------------------------------------------------------------
Failed | cmTC_5b09a.vcxproj [Debug|Win32]
Time Elapsed 00:00:02.009
You are building for the x86 platform but the libraries are targeting x64. You should change the target of your project to x64 and it should work.
How would I change that from the configure.py script?
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 the configure.py
script
1>------ Build started: Project: cmTC_3102e, Configuration: Debug x64 ------
1> Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> cl /c /I"C:\OpenGL-Deps\GLEW-2.0\include" /IC:\Users\Nabil\Documents\GitHub\oglplus\include /IC:\Users\Nabil\Documents\GitHub\oglplus\implement /IC:\Users\Nabil\Documents\GitHub\oglplus\utils /IC:\Users\Nabil\Documents\GitHub\oglplus\_build\include /I"C:\OpenGL-Deps\GLFW3\include" /I"C:\Program Files (x86)\Visual Leak Detector\include" /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_3102e.dir\Debug\\" /Fd"cmTC_3102e.dir\Debug\vc140.pdb" /Gd /TP /errorReport:prompt C:\Users\Nabil\Documents\GitHub\oglplus\_build\gl\has_GL_4_3.cpp
1>
1> has_GL_4_3.cpp
1>c:\users\nabil\documents\github\oglplus\_build\gl\assert_GL_VER_symbols.ipp(2148): warning C4067: unexpected tokens following preprocessor directive - expected a newline
1>c:\users\nabil\documents\github\oglplus\_build\gl\assert_GL_VER_symbols.ipp(2151): warning C4067: unexpected tokens following preprocessor directive - expected a newline
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>has_GL_4_3.obj : error LNK2019: unresolved external symbol __imp_glGetError referenced in function "public: __cdecl oglplus::GLAPIInitializer::GLAPIInitializer(int,int)" (??0GLAPIInitializer@oglplus@@QEAA@HH@Z)
1>has_GL_4_3.obj : error LNK2019: unresolved external symbol __imp_glGetIntegerv referenced in function "bool __cdecl do_query_gl(void)" (?do_query_gl@@YA_NXZ)
1>C:\Users\Nabil\Documents\GitHub\oglplus\_build\gl\CMakeFiles\CMakeTmp\Debug\cmTC_3102e.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Projects build report:
Status | Project [Config|platform]
-----------|---------------------------------------------------------------------------------------------------
Failed | cmTC_3102e.vcxproj [Debug|x64]
Time Elapsed 00:00:03.133
OK, have a look at the project's properties and see if there is opengl32.lib in the list of link libraries.
Yep that was the problem (it wasn't there). I also had to copy-paste glew32.dll into that cmTC_3102.exe folder for the program to work. It then detected OpenGL 4.3 (since that was the random project I opened). Do I need to re-run the configure script now?
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).
That worked, now it's complaining about more glew32.dll missing O_o
In the past when I've tried OGLplus on some Windows machines, I got MSVC linker errors from glew unless I used the static library instead of DLL. Maybe that's worth a shot.
When I type in the path to the static library, --library-dir C:...\glew32s.lib it can't find it. If I simply leave a path to the directory, the script uses the glew32.lib
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 :P
It's a hacky workaround, but I'm still at a bit of a loss as to what the actual problem is.
Thumbs up. Yeah, linking on Windows especially with projects generated by cmake can be tricky.
Yeah well the main reason I work on Windoze is because I'm totally hooked on Visual Studio, and Linux has nothing that can even compete with it :\
Anyways, I'll go ahead close this up now that I've gotten things to work out (still don't know why but WHATEVER) Thanks for the help!!
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.
No worries lol. I got totally sidetracked with trying to get the examples to compile ^.^
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.