CodeBlocks configuring OpenGL

Download Windows environment GLUT, link: https://pan.baidu.com/s/1U43rth8-9W6AcP2zG3GFRw password: i2zu
Glut.h, Glut32.dll, LibGlut32.a, MSVCR70.dll

The following directory is mine, the specific operation pay attention to their own installation directory

1. Put Glut. h in F:\Program Files\ Codeblocks \ MingW \ Include \GL
2. Put libglut32.a in F:\Program Files\CodeBlocks\MinGW\lib
3. Place glut32. DLL in C:\Windows\System32 for 32-bit OS and C:\Windows\ Syswow64 for 64-bit OS
Then create a GLUT project

Then specify the GLUT location (this is just my location, notice your installation directory).

Online other people’s tutorials tutorials may be so far, but I have the following problems

You should start the code with a #include< windows.h> OK, but it looks like it’s going to be above the sentence GLUT


The last problem is an error that says “because msvcr70.dll……….. cannot be found” C:\Windows\System32 or C:\Windows\SysWOW64. These two directories should be the difference between 32-bit and 64-bit systems

Read More: