Xc.h Library Download -
Instead of searching for the file, you must install the compiler toolchain. xc.h comes bundled with the compiler installation.
Add the -I flag to your compile command: xc.h library download
xc8-cc -mcpu=16F877A -I"C:/Program Files/Microchip/xc8/v2.xx/include" main.c
Because you downloaded a decoupled, obsolete file. Delete it immediately. Follow the official compiler installation method above. Instead of searching for the file, you must