Build openGL in CodeBlocks

To build openGL on CodeBlocks we should follow these little instractions

1.  Download Glut Library .zip file

2. Copy glut.h file to drive: \CodeBlocks\MinGW\include\GL folder

3. Copy glut.lib file to drive: \CodeBlocks\MinGW\lib folder

4. Copy glut,dll file to C:\Windows\System32or C:\Windows\System32 folder

then follow these steps carefully

step 1:  Open the code block you will see window as below and click on create new porject link, like this

codeblock opening page

step 2: click on GLUT project as shown in image below
click next


write project title name ,give path to save project and write projec filename will create by default from   project title name.

codeblocks  UI

After that click next.

step 3: now give the path “Drive:\CodeBlocks\MinGW” for glut location

codeblocks UI

Then click next.

codeblocks UInow enter the finish button

step 4:

codeblocks coding UI

now you see the project is created and you will get default main.cpp file don’t forget to write  “#include<windows.h>” header file otherwise you will get error now built and run it will see window as below.

codeblocks Output Window

your project is created you can write your own code.