fail to upload the program

I am new to use Ardunio Mega 1280. when I am going to upload the program I can't do it though I am following the direction they suggested in website.

I am using windows 7 operating system. it shows following error.
########################################
core.a(main.cpp.o): In function main': C:\Users\mohan\Desktop\arduino-0019\hardware\arduino\cores\arduino/main.cpp:7: undefined reference to setup'
C:\Users\mohan\Desktop\arduino-0019\hardware\arduino\cores\arduino/main.cpp:10: undefined reference to `loop'
#############################################

Your Sketch requires a setup function and a loop function. Start with this...

void setup( void )
{
  // Your code goes here
}

void loop( void )
{
  // Your code goes here
}

I presume the sketch already has a setup and loop function...

I have had this issue before but I can't remember what caused it.

Mowcius