Windows - Not Finding glext.h

Hi Folks:

I took Paul G. Griffiths advice and started these tutorials.

Thanks for telling me about these Paul, amazing tutorials.

I’m at the texture lesson, and trying to build Soil’s demonstration project, test_SOIL.

The build fails because the file glext.h isn’t found.

I’ve downloaded latest versions of GLEW, GLFW and GLM, but none of these downloads seem to include glext.h.

I search my system for glext.h, but the only copy I find was brought into my system by the OpenGL tutorial I was using.

I’d like to get the current copy from the source, along with anything useful that might come with it.

Shouldn’t this already be on my system?

I’ve downloaded it form https://www.opengl.org/registry/api/GL/glext.h, I hope. Shouldn’t this have come with GLEW?

  Thanks
  Larry

From the glew installation page:

It is important to keep in mind that glew.h includes neither windows.h nor gl.h. Also, GLEW will warn you by issuing a preprocessor error in case you have included gl.h, glext.h, or glATI.h before glew.h.

You can also check this page.

glext.h does not come with GLEW (it’s not necessary) nor does it come with any Windows SDK (where the general recommendation is to use something like GLEW instead).

From reviewing the SOIL demo projects, it seems as though you’re using CodeBlocks, which is the only project that includes the test_SOIL.cpp source file. All that glext.h contains is a bunch of #defines and function prototypes for GL versions higher than 1.1, so - as I remarked above - since you’re using already GLEW it’s not actually necessary. You can remove this #include from the code, include and link to GLEW instead, remembering to call glewInit in the appropriate place (after creating your context but before making any GL calls) and everything should work.