Probably best to just point you to the discussion where I am trying to work out this problem.
http://arduino.cc/forum/index.php/topic,108647.0.html
The code, errors and my efforts to fix them are documented there.
They tell me it's probably not the code but a problem with the includes... which I don't seem to be using properly.