When writing code in C or Objective C, you can compile basic code with gcc. The C tutorial above describes this.

This page also describes the basics for a Cocoa / Objective C application that compiles with gcc:
http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html