Where can I download gl.h?

I just installed Windows 7 and my code relies on gl.h and other gl files to compile. (gl, glu, glext, glut, glaux and wglext) I originally just typed “download gl.h” in google and found it. Now it doesn’t seem to exist. I’ve spent the last hour searching around and all links that seem to say they have it, don’t work. Everyone says look on opengl.org. That has proven very fruitless.

Does it even exist? Has it been merged into something else?

If so, can someone PLEASE provide a direct link? Thank you. Thank you!

I just installed Windows 7 and my code relies on gl.h and other gl files to compile.

I don’t know of a C++ compiler environment for Windows that doesn’t include <gl/gl.h>. All of the Visual Studios do, even the express editions. The Windows Platform SDK does.

So maybe you should look at your compiler environment and check to see if your include paths are working.

Visual C++ 2005 Express doesn’t provide it, but then again it doesn’t provide the Windows SDK headers and libs either, so they need to be downloaded and they will include gl.h

Fortunately it’s an absolute doddle to upgrade a 2005 project to 2008.

Thanks for the reply. I did a search in my include directories and found it. I didn’t realize it was there. Unfortunately VC doesn’t auto point to it, I had to update my include paths. Lame…

Any ideas where I could find glext, glut, glaux or wglext?

Thanks, I appreciate the help.

Any ideas where I could find glext, glut, glaux or wglext?

You didn’t spend any time searching for those. At all. Typing “glext” into Google came to this on the second link: The OpenGL Registry (the actual header was the first link in Google). Which is also conveniently linked from every page at OpenGL.org (and anyone spending any time doing GL programming should have it on a quick-link bookmark).

Also, never use glaux. There’s no reason to do so. It is beyond ancient, and was never particularly good when it was fairly new.

Similarly, never use GLUT. Use FreeGLUT instead. GLUT is old, but unlike glaux, was actually good. GLUT simply hasn’t been updated in almost a decade, and it shows. FreeGLUT is almost 100% compatible with GLUT and adds new features on top of that.

MSVC does automatically add it to your include directories for all projects if you’ve set things up correctly and haven’t messed with it afterwards. If you can #include <windows.h> then you can also #include <gl/gl.h>, end of story. The sole exception is 2005 Express which needs quite a bit of jiggerypokery, but that’s also needed for plain old windows.h and is not an “OpenGL on Windows” thing.

I’ve been running into compiler errors: Specifically -


main.obj : error LNK2019: unresolved external symbol __imp__glPopMatrix@0 referenced in function _WinMain@16

…which means I don’t have the object files set up in the linker for the gl.h files to compile with. Any idea where I can find the library files for the NVidia drivers after they’ve mysteriously installed somewhere? Can I also get help with the configuration page for Microsoft Visual Studio 2010?

I’ve done this before, and I’m sure it works…

Link with opengl32.lib (part of Windows SDK, comes with Visual Studio).

Either add this line to a .c (or .cpp) file somewhere in your project:

#pragma comment (lib, "opengl32.lib")

Or set your linker options to include “opengl32.lib” in “Additional Dependencies”.

fatal error C1083: Cannot open include file: ‘GL/glaux.h’: No such file or directory

I’m quite new at opengl and it’s very critical for me to fix that. I couldn’t do this for minutes. Could anyone help?

You’re following a NeHe tutorial for loading a bitmap?

glaux is an old old old old old library that has been deprecated for roundabout 15 years or so and no longer ships with any IDE or SDK. You shouldn’t use it in other words; there are plenty of other image libraries around that are more up to date. DevIL is one example and there is even a page describing how to use it with OpenGL here: http://openil.sourceforge.net/tuts/tut_10/index.htm; there are plenty of others.

Hi,

MinGW has gl.h, glu.h and glext.h inside the C:\MinGW\include\GL

Install MinGW from sourceforge. Select the C++ packages/compiler
I installed mingw-get version 0.6.2-beta-20131004-1.

I used MinGW and CodeBlocks (witch requires the GCC compiler from Mingw) to compile the glxgears project from linux in Windows 7.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.