Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: Win 10 OpenGL

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2009
    Posts
    21

    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

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,546
    -lopengl32

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2009
    Posts
    21
    Dark Photon: Not sure what you are trying to say, is this "lopengl32" a library, how does one include with Visual Studio 2017? Sid

  4. #4
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,546
    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:

    http://nehe.gamedev.net/tutorial/cre...in32%29/13001/

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2009
    Posts
    21
    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

  6. #6
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,546
    The graphics drivers for your GPU typically provide the OpenGL library. See this page for GPU driver download links:


    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.

  7. #7
    Junior Member Newbie
    Join Date
    May 2018
    Posts
    14
    The easiest way is to use CMake:

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •