Issue #40 wontfix

Linking against opengl32.lib? (documentation)

schulzcbs
created an issue

The documentation states

there is no library to build, no unresolved extenals (typo: externals) to filter through.

which doesn't seem to be true, as gl.c (generated by version 1.1.1) uses wglGetProcAddress(). Either the documentation is misleading here or the implementation is bugged. Possible fixes:

  • State that you have to link against opengl32.lib
  • Add #pragma comment(lib, "opengl32.lib") to link against opengl32.lib without telling anyone
  • Load wglGetProcAddress() from opengl32.dll using GetModuleHandle() (?)
  • Make me hold it right, if I'm holding it wrong :)

Comments (3)

  1. Jason McKesson repo owner

    You're using OpenGL. I don't feel the need to state that, in order to use OpenGL, you must link to OpenGL. And I'm strongly against #pragma lib stuff.

    The point of the statement is that you're not linking to an additional library, the way you would with, for example, GLEW (where you have to link to OpenGL and GLEW).

  2. schulzcbs reporter

    Thanks for the clarification. While reading the docs my first thought was that you load opengl32.dll completely dynamic, so it would have been possible ;-)

  3. Log in to comment