If you have Blender 3D 2.65, creating a Gear is just a matter of one click. You may have to activate "Extra Objects" to make them. This can be found in the Preferences (Add Curve: Extra Objects) or download the free script at the link I provide below.
sources used for this step:
- : source