servo library not working

HI I have been trying to get a servo to work on my arduino mega but every time I try to verify it gives me this

/Users/admin/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp: In member function 'uint8_t SoftwareServo::attach(int)': /Users/admin/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:27: error: 'digitalWrite' was not declared in this scope /Users/admin/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:28: error: 'OUTPUT' was not declared in this scope /Users/admin/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:28: error: 'pinMode' was not declared in this scope /Users/admin/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp: In member function 'void SoftwareServo::write(int)': /Users/admin/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:51: error: 'clockCyclesPerMicrosecond' was not declared in this scope /Users/admin/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp: In static member function 'static void SoftwareServo::refresh()': /Users/admin/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:73: error: 'millis' was not declared in this scope /Users/admin/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:106: error: 'digitalWrite' was not declared in this scope /Users/admin/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:108: error: 'TCNT0' was not declared in this scope /Users/admin/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:123: error: 'digitalWrite' was not declared in this scope

can anyone please help

WProgram.h. vs. Arduino.h ?

What version of the IDE are you using ?

Im using 1.5.2

And which version is the library written for?

i dont know im new to arduino I used Servo.h

It's just a tiny bit difficult to see what is wrong with your code when you haven't posted a copy of it. We are no clairvoyant.

...R

This is like pulling teeth. Post code.

Post your sketch, post the header, post anything you think might help us to help you, but please remember to use code tags.

// Sweep
// by BARRAGAN http://barraganstudio.com
// This example code is in the public domain.

#include <Servo.h>

Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created

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(15); // waits 15ms for the servo to reach the position
}
for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}
}

Users/admin/Documents/Arduino/libraries/Servo/Servo.cpp: In member function ‘uint8_t Servo::attach(int)’:
/Users/admin/Documents/Arduino/libraries/Servo/Servo.cpp:28: error: ‘digitalWrite’ was not declared in this scope
/Users/admin/Documents/Arduino/libraries/Servo/Servo.cpp:29: error: ‘OUTPUT’ was not declared in this scope
/Users/admin/Documents/Arduino/libraries/Servo/Servo.cpp:29: error: ‘pinMode’ was not declared in this scope
/Users/admin/Documents/Arduino/libraries/Servo/Servo.cpp: In member function ‘void Servo::write(int)’:
/Users/admin/Documents/Arduino/libraries/Servo/Servo.cpp:52: error: ‘clockCyclesPerMicrosecond’ was not declared in this scope
/Users/admin/Documents/Arduino/libraries/Servo/Servo.cpp: In static member function ‘static void Servo::refresh()’:
/Users/admin/Documents/Arduino/libraries/Servo/Servo.cpp:74: error: ‘millis’ was not declared in this scope
/Users/admin/Documents/Arduino/libraries/Servo/Servo.cpp:107: error: ‘digitalWrite’ was not declared in this scope
/Users/admin/Documents/Arduino/libraries/Servo/Servo.cpp:109: error: ‘TCNT0’ was not declared in this scope
/Users/admin/Documents/Arduino/libraries/Servo/Servo.cpp:124: error: ‘digitalWrite’ was not declared in this scope

hope you can help and thanks

but please remember to use code tags.

When I verify your code, I get:

Binary sketch size: 2,666 bytes (of a 30,720 byte maximum)

There is something hosed up with your installation.

Do you know what I can do about it

Downloading and reinstalling the Arduino IDE would be a good place to start.