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.
Hello @Sid Kraft ,
A few things might be worth checking, as this looks more like a setup or linking detail than a bad download.
- 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.
- 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).
- "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)
- 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.