As the example sketch, BareMinimum, shown below, you must have a setup() and loop() function in your sketch, even if you don't put anything in them as shown here:
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}