I have tried using the include section u just suggested,sorry i forgot to mention that,its giving a bunch of errors about the edb header declarations which means i have to redefine the header file or something.i was hopping to try the example and see what it does and i understand it should be working with few modifications.
I had to include Arduino.h and it reduced the errors to only the one about no WProgram.h directory.
thank