An issue I had with OpenGL was that I had to include <windows.h> before <gl.h> (or <GL/gl.h>). Also, include opengl32.lib (and perhaps glu32.lib) in your additional dependencies in your linker...