Lazy Foo' Productions

Setting up freeGLUT on Code::Blocks 10.05

Last Updated 8/09/12
1)Start up Code::Blocks and create a new empty project.

2)Go to project properties.

4)Now we have to tell Code::Blocks to link against the OpenGL/freeGLUT libraries. Go to build options.

Go under Linker Settings and paste
-lGL -lGLU -lglut
into the other linker options field and click OK.

5)Go back to the project properites and under Build Targets select the build type.
I recommend setting it to GUI Application if you don't want console output, and Console Application if you do want console output.

6)Now go download the source for lesson 01. Add the source files inside to your project.

Now build. If there are any errors, make sure you didn't skip a step.

Now that you have OpenGL and freeGLUT compiling, it time to go onto part 2 of the tutorial.
The documentation for OpenGL can be found here.
The documentation for GLUT (the API freeGLUT is based on) can be found here.
The documentation for freeGLUT can be found here.

Hello OpenGL Part 2: Your First Polygon