OpenGL Library Routines

Sid Kraft 46 Reputation points
2026-07-02T01:16:59.0866667+00:00

Downloaded the Open GL Library routines and directed Visual Studio, C++ header lines as follows:

#include <C:\glfw-3.4\Include\GLFW\glfw3.h>

#include <C:\glfw-3.4\Include\GLFW\glfw3native.h>

The C++ header directives seem to work ok. However, when I build the execution module and tried to call routines from the OpenGL library, like glRotate(...), etc. the output included the error, "cannot find the module requested". I am wondering if I downloaded the appropriate library files and also, is there a better location to download the correct files from? All of the documentation that I have read implied that the library directives should include GL/gl.h or GL/glu.h, which are definitely not the ones that I have included in my downloads

Developer technologies | C++
Developer technologies | C++

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Taki Ly (WICLOUD CORPORATION) 2,815 Reputation points Microsoft External Staff Moderator
    2026-07-02T04:06:49.4+00:00

    Hello @Sid Kraft ,

    A few things might be worth checking, as this looks more like a setup or linking detail than a bad download.

    1. GLFW is not the same as the GL drawing routines. GLFW mainly handles windowing, context, and input; it does not provide legacy calls like glRotate. Those live in opengl32 and are declared in GL/gl.h, so it is expected that GL/gl.h and glu.h are not inside the GLFW package.
    2. You likely do not need to download GL/gl.h. With the Desktop development with C++ workload, GL/gl.h, opengl32.lib, and glu32.lib usually already ship with the Windows SDK (for example, C:\Program Files (x86)\Windows Kits\10\Include<version>\um\gl).
    3. "Cannot find the module requested" often points to the linker, not the headers. Since your include resolves, the issue may be at the link stage; include alone is not enough. It could be worth adding these under Project, Properties, Linker, Input, Additional Dependencies:
    • opengl32.lib (for the gl routines)
    • glu32.lib (only if you use the glu helpers)
    • glfw3.lib (for GLFW)
    1. Consider avoiding absolute include paths. Instead of #include <C:\glfw-3.4\Include\GLFW\glfw3.h>, adding C:\glfw-3.4\include under C/C++, General, Additional Include Directories and using #include <GLFW/glfw3.h> tends to be more portable. Note that on Windows, GL/gl.h often expects windows.h to be included before it.

    On my side, I tried to reproduce a similar setup and saw these three distinct stages, which may match what you are hitting:

    • Calling glRotatef with no GL/gl.h in scope failed at compile time with "glRotatef was not declared in this scope". This suggests the routine simply is not declared by the GLFW headers alone.
    • Adding #include <GL/gl.h> made it compile, but with no OpenGL library linked it then failed at the link stage with an "undefined reference to glRotatef" error. This is the stage that tends to surface as a missing module or unresolved symbol, and it lines up with the message you described.
    • Including GL/gl.h and linking opengl32 (in my test, -lopengl32; in Visual Studio, opengl32.lib) built and ran cleanly. So in my case the difference was purely the link settings, not the download.

    Based on that, it may be worth confirming whether your error appears at compile time or at link time, since the two point to different fixes.

    Some documents that may help:

    Disclaimer: Some links are non-Microsoft website. The pages appear to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classifies as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.

    If you can share the full error text (including the module name) and your Linker, Input settings, it should be easier to narrow down. If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide for your confirmation.

    Thank you.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.