MPLAB Program won`t recognize xc.h header
Try to add all the items from the /include folder that is locate where you installed the xc8 or xc16.
To do this, right-click the project and go to properties.
Go to XC8 global option (or XC16) and click on XC8 compiler (or XC16).
Click the three dots righ next to &quot;Include Directories&quot;.
Click browse and  find the following directory \Program Files\Microchip\xc8\vx.xx\pic\include, there you will find some other folders, you will add all of them, one by
one.
Hit apply.