Question

I have a C language code and I'm going to run on a PIC microcontroller.I am using a Mplab IDE 8.92 with Mplab C18 3.46.I've never done this before with microcontroller.
Before I have compiled this code using Mingw.But now that the Mplab I use it I get an error:
unable to locate 'inttypes.h'
How do I solve this problem and same problems?

Edit--------- my micro is PIC18f2550.I have used the mplab c18 and mplab xc8 and Both were error.then for test I have used the mplab xc32 and micro piC32...!Was compiled without any problems.
can i use x32 header file for xc8?

Était-ce utile?

La solution

inttypes.h is a C99 file and MPLAB C18 only supports C89.

How do I solve this problem and same problems?

inttypes.h defines some macros and includes stdint.h C99 header. Try to remove the include line of inttypes.h in your source file and declares yourself the missing types (like typedef unsigned char uint8_t;, etc.).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top