Error compiling

You either tried to compile an empty sketch (unlikely) or you've written a program that misses the arduino entry points: setup() and loop().

See the examples included with the Arduino IDE. E.g. File => Examples => Basics => BareMinimum