Home › Forums › MPLAB XC8 Tutorial Discussions › How to use FatFs library in MPLAB XC8 without MPLAB Code Configurater? › Reply To: How to use FatFs library in MPLAB XC8 without MPLAB Code Configurater?
02/08/2017 at 10:33 #2580
Hi. We found some few problems in your code:
- The error the compiler is complaining about it’s this: newmain.c:11: error: (141) can’t open include file “spi.h”: No such file or directory. You have this line of code in your project: #include “spi.h” but you don’t have this “spi.h” file in your project. You can’t include a file unless you have created/added that file.
- There is no need to have this #include <p18cxxx.h> in your main code as in your “newxc8_header.h” you have included already: #include <xc.h>. With XC8 compiler #include <xc.h> is sufficient to include the PIC