The first time I write OpenGL program, what should I do when I encounter “can’t open include file:” GL / glaux. H “: no such file or directory”?

Recently, while learning the tutorial of Nehe, I use VS2010 as the learning and development platform.

I just copied the nehe code into the empty project I built. I was about to compile and run, but I did not expect to meet the “cannot open the included file:” glaux-h “: No such file or directory”! How to do?

So, I, there is no relevant glaux file in the system.

Therefore, the solution is as follows:
1) Search and download GLAUX related files online
2) Copy glaux. DLL to C:\Windows\System32
3) Copy glaux.lib to C:\Program Files (x86)\Microsoft SDKS \Windows\v7.0A\ lib
4) Copy glaux. H to C:\Program Files (x86)\Microsoft SDKS \Windows\ V7.0 A\Include\ GL

Click Compile Run again, “Cannot resolve the external symbol [email protected], the symbol in the function” appears.

Once again baidu, originally, is not to join the related lib caused, so also in the code to add:
#pragma comment(lib,”opengl32.lib”)
#pragma comment(lib,”glu32.lib”)
#pragma comment(lib,”glut32.lib”)

Actually, I didn’t find glut32.lib on my computer, so I commented the “#pragma comment(lib,”glut32.lib”)”.

Click compile and run again, and the program finally runs. It’s a relief.

Read More: