Cody Smith
Cody Smith

Reputation: 2732

VisualStudio 2012 Where is gl.h?

So I was trying to get GLFW running, finally managed to get everything going good. Then thinking I had solved the issue I uninstalled Visual Studio 2010 (note I'm using VS 2012, I installed 2010 thinking it might be a 2012 issue) and the Windows SDK, both things I downloaded thinking I somehow needed them to run GLFW.

Between one of those, my project broke. It's now not finding gl.h, which according to some Googleing should either be included with Visual Studio or in the Windows SDK.

Well after re-installing the SDK, the error persists. I even checked the folder, there doesn't appear to be a gl.h in there.

So I repaired Visual Studio 2012, and no dice. Also searched the VS VC includes folder and found no gl.h, so my question is where the hell is gl.h hiding? Or at the least what piece of software does it come with, the Windows SDK? VS? Something else?

Upvotes: 3

Views: 6049

Answers (1)

danijar
danijar

Reputation: 34175

The header gl.h is part of the Windows SDK, but might be already installed on your system. After your re-installation it should definitively there.

In order to use all OpenGL functions on all devices you need an extension wrangler like GLEW. One which includes all needed headers, like gl.h, for you. There are some tutorials out there explaining how to set up OpenGL and GLEW, I recommend the page http://open.gl.

For me Visual Studio 11 worked fine with OpenGL under Windows 8. You only have to link the correct libraries.

Upvotes: 2

Related Questions