Make sure that you have included stdio.h at the begining of the program like so
If that doesn't work then try adding
Code:
-mL -nw=2066 -D_FRC_BOARD
to the build options menu MPLabC18 tab, then click use alternate settings and add that to the end so it looks like this:
Code:
-Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -mL -nw=2066 -D_FRC_BOARD
Hopefully this will help you with your problem.