Compile Error in Mac OSX

Hello I have a problem with the compiler. It will be nice if someone could help me.
Also, It worked fine just till this happened. I am running El Capitan 10.11 Beta if that helps.

Arduino: 1.6.5 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

core.a(main.cpp.o): In function `main':
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/main.cpp:34: undefined reference to `setup'
collect2: error: ld returned 1 exit status
Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

What were you compiling? It appears that your sketch does not have a setup() function.

Also, It worked fine just till this happened.

What did?

PaulS:
What were you compiling? It appears that your sketch does not have a setup() function.

I actually didn't see that I was missing setup indeed. So yes it was my fault not reading the error message carefully so sorry and thank you for trying to help me though.