简体   繁体   English

PIC Micro,无法找到“ inttypes.h”

[英]PIC Micro and unable to locate 'inttypes.h'

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. 我有C语言代码,将要在PIC微控制器上运行。我正在将Mplab IDE 8.92与Mplab C18 3.46配合使用,而我以前从未在微控制器上做到这一点。
Before I have compiled this code using Mingw.But now that the Mplab I use it I get an error: 在我使用Mingw编译此代码之前,但是现在我使用的Mplab出现错误:
unable to locate 'inttypes.h' 无法找到“ 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. 编辑---------我的微型计算机是PIC18f2550。我用过mplab c18和mplab xc8,两者都出错了。 。
can i use x32 header file for xc8? 我可以将x32头文件用于xc8吗?

inttypes.h is a C99 file and MPLAB C18 only supports C89. inttypes.h是一个C99文件,MPLAB C18仅支持C89。

How do I solve this problem and same problems? 我该如何解决这个问题?

inttypes.h defines some macros and includes stdint.h C99 header. inttypes.h定义了一些宏,并包括stdint.h C99标头。 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.). 尝试在源文件中删除inttypes.h的包含行,并声明自己缺少的类型(如typedef unsigned char uint8_t;等)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM