Lazy Foo' Productions

1)Start up Code::Blocks and create a new empty project.
new project

2)Go to project properties.
project properties

4)Now we have to tell Code::Blocks to link against the OpenGL/freeGLUT libraries. Go to build options.
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.