Error Message

I am using this example code so I can understand the basics but I am getting this error message:
#include <Servo.h>

Servo myservo; // create servo object to control a servo

int pos = 0; // variable to store the servo position

void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}

void loop() {
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(1000); // waits 1 sec for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(1000); // waits 1 sec for the servo to reach the position
}
}

Arduino: 1.7.1 (Windows 7), Board: “Arduino Uno”

sketch_oct18a.cpp.o: In function `loop’:

C:\Program Files (x86)\Arduino/sketch_oct18a.ino:16: undefined reference to `delay’

C:\Program Files (x86)\Arduino/sketch_oct18a.ino:20: undefined reference to `delay’

Servo\avr\Servo.cpp.o: In function `handle_interrupts’:

C:\Program Files (x86)\Arduino\libraries\Servo\src\avr/Servo.cpp:58: undefined reference to `digitalWrite’

C:\Program Files (x86)\Arduino\libraries\Servo\src\avr/Servo.cpp:65: undefined reference to `digitalWrite’

Servo\avr\Servo.cpp.o: In function `Servo::attach(int, int, int)’:

C:\Program Files (x86)\Arduino\libraries\Servo\src\avr/Servo.cpp:240: undefined reference to `pinMode’

C:\Users\CHAVEZ~1\AppData\Local\Temp\build5529494680062006065.tmp/core.a(main.cpp.o): In function `main’:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:32: undefined reference to `init’

collect2.exe: error: ld returned 1 exit status

Error compiling.

This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.
Can some one help me understand this error message please.
Thanks in advance

The hell... it's not recognizing the builtin arduino functions...

Arduino: 1.7.1

Is that an arduino.cc release or an arduino.org release ?

UKHeliBob: Arduino: 1.7.1

Is that an arduino.cc release or an arduino.org release ?

Oh, no wonder, those versions have serious issues.

Update to 1.8.x