Re: How can I use functions from PLIB
You can still use the PLIB. You should be able to access them form XC8 v1.34 or earlier which can still be downloaded from microchip website. And if you are using the latest XC8 compiler, you can download them separately from the same XC8 compiler download page (now called legacy peripheral libraries) and install them manually into your compiler.
There is a PIC18F Peripheral library help document (MPLAB_XC8_Peripheral_Libraries.pdf) found inside the compiler installation directory under the docs folder.
Use this document to learn how to use the PLIB functions.
Start by searching your PIC, then "CLICK HERE for peripheral library support for this device", then I2C.