RobotStudio event

RAP - Program not registered

Im trying to create an application using RAP.
I get the following error

RPC: Program Not Registered

I tried using RPCGEN again, but after using RPCGEN i get lots of compilation errors.

Dont know if you guys know something about this.