They must be some incompatibility of peripheral libraries with XC8 v1.41. That is why it’s giving that error. We tried your code with XC8 v1.34 it compiles well without any problem. As you are aware microchip is phasing out the peripheral libraries, they want people to use the new MPLAB Code Configurator, they are no longer updating the peripheral libraries and thus might not be compatible with new compilers. We would advice you to download XC8 v1.34 under the: Download archives

Stay Update:

Search Here

Translate Website into your Language

Please support our work with a Donation

Writing tutorials and recording tutorials videos requires a lot of resources and time. If you found these tutorials helpful, please show your support and donate any amount you wish so that we can do even more.
Thanks