0% found this document useful (0 votes)
177 views

Steps To Install Code Blocks and Configure Glut

1. Download and extract Code Blocks files and freeglut files, then copy the freeglut files to the Code Blocks MinGW folder to configure it to use freeglut instead of glut32. 2. Edit two files, wizard.script and glut.cbp, replacing instances of glut32 with freeglut. 3. Open Code Blocks, create a new Glut project, select the freeglut location, and edit and run the default main.cpp file to test that freeglut is configured correctly.

Uploaded by

SHANKAR R Cse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views

Steps To Install Code Blocks and Configure Glut

1. Download and extract Code Blocks files and freeglut files, then copy the freeglut files to the Code Blocks MinGW folder to configure it to use freeglut instead of glut32. 2. Edit two files, wizard.script and glut.cbp, replacing instances of glut32 with freeglut. 3. Open Code Blocks, create a new Glut project, select the freeglut location, and edit and run the default main.cpp file to test that freeglut is configured correctly.

Uploaded by

SHANKAR R Cse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Steps to install Code Blocks and configure glut

1. Download and extract the .rar file sent in the mail by Shankar.

2. Install code blocks through the setup found in the extracted folder, selecting all defaults.

3. Go back to extracted folder-->freeglut-MSVC-3.0.0-2.mp-->freeglut , then copy all the 3 folders named


bin, include and lib.

4. Navigate to the directory where code blocks is installed. If you selected all default, then this should be
the path to find the installation directory:C:\Program Files (x86)\CodeBlocks . Proceed to the MinGW
folder and inside it, paste the folders copied in the previous step. It will ask for overwrite permission,
select YES for all. Also, provide admin permission to it if required.

5. Then navigate to this directory:

C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut

6. Open wizard.script with some editor, then CTRL+f. In the 'find' pop-up window, search for glut32. You
will find 2 places in the file where there is a string: glut32. To be precise, on line 63 and on line 113.
Change the string glut32 to freeglut. Save the file. Provide admin permission if it asks for(it will definitely
ask you for it).

7. Now enable the file extentions(if not already enabled, ofcourse) in the windows explorer. Google it if
you don't know how to do it.

8. Navigate here: C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates

9. Search for glut.cbp in the templates folder and open it with some editor, then CTRL+f. In the 'find'
pop-up window, search for glut32. You will find 1 place in the file where there is a string: glut32. To be
precise, on line 20. Change the string glut32 to freeglut. Save the file. Provide admin permission if it
asks for.

10. Close everything (don't shut down your PC, please) and open Code Blocks.

11. Select 'Create new project'.

12. Select Glut Project then click GO.


13. Give any project title and for project folder, click the browse button at the end.

14. Select the location where you want to save your projects and then click NEXT.

15. This window will appear,select browse button again and browse to this location to select GLUT's
location: C:\Program Files (x86)\CodeBlocks\MinGW. Or you can just copy paste this link into that
box.
16. Click Next and then Click Finish.

17. Double-click main.cpp to open the default source code. Then edit it and click f9 to run it.

ERROR HANDLING in Codeblocks... Not Java or C or Python


If you get this error, then follow the steps below.

Select Settings--->Compiler.
Select Toolchain Executables.

Then in the box, paste this link: C:\Program Files (x86)\CodeBlocks\MinGW

This should wrap up the most common errors and configuration is done as well. If you find any difficulty in

understanding the above steps contact me.

You might also like