I have code from the OpenGLBook (openglbook.com) which compiles, but does not load. I have absolutely no idea why it\'s not loading. The code is as follows:
main
Try debugging! Place a breakpoint on your main function and step through until something causes the program to exit.
As Nicol Bolas mentioned, you might not have a graphics card that supports OpenGL 4.2. Go on to AMD or nVidia's website and find out if your graphics card supports OpenGL 4.2. If not, then change the following line to whatever version your card supports.
glutInitContextVersion(4, 2);
glutInitContextVersion(4, 2);
Does your current graphics driver actually support OpenGL 4.2? If not, then your window creation will fail. 4.2 is still rather new; try 4.1 instead.