Win 10 OpenGL

Using window 10 and Visual Studio 2017, have a project created and using C and the OpenGL applications. Getting errors related to the OpenGL library routines, cannot find. How do I include them in this app

-lopengl32

Dark Photon: Not sure what you are trying to say, is this “lopengl32” a library, how does one include with Visual Studio 2017? Sid

The name of the library you need to link with is Opengl32.lib. -l is the name of the command-line option used to say to the linker “link with the following library”.

Check out this tutorial for some help specifying link librarys in MSVS:

Dark Photon: Have Visual Studio 2017 installed, tried to run the project using OpenGL commands, didn’t find library. As you stated, need to have opengl32 installed. I searched my PC, cannot find the library therefore, probably not installed. How do I download, to where and how do I provide the link in the Visual Studio 2017 once on my computer? Sid

The graphics drivers for your GPU typically provide the OpenGL library. See this page for GPU driver download links:

[ul]
[li]Getting Started [/li][/ul]
Once you have them installed, verify that the library now exists on your computer.

Then consult the MSVS documentation if you need to know how to specify include and library paths/libraries to MSVS projects. OpenGL32 is just another library. You can websearch “visual studio link opengl” for some tips.

The easiest way is to use CMake:


find_package(OpenGL)
target_link_libraries(YourApplication ${OPENGL_gl_LIBRARY} )