Thanks for your reply. I'm using C30 compiler...I think you are right..but i'm not sure which header file should I add since I'm still new to this compiler.
I don't use C30 so I'll have to pass the question to other board users. It might be useful to look at other C30 programs to see how they do it. I would guess there is a common header with the missing information in it.
Alternatively, you could make your own, for example changing:
#define LED1 PORTBbits.RB1
into
#define LED1 PORTB,1
(or #define LED1 LATB,1 if that is more appropriate)