我在一个库中有一个头文件,其中包含inttyes.h(使用PRIu8等时需要)。我将库头文件包含到我自己的应用程序文件中。
当我尝试在lpcxpresso(基于eclipse)中使用arm- on eabi- compile进行编译时,我得到了以下错误
inttypes.h: No such file or directorybuild命令是
arm-none-eabi-gcc -std=c99 -DDEBUG -D__CODE_RED -DCORE_M3 -D__USE_CMSIS=CMSISv1p30_LPC17xx -D__LPC17XX__ -D__REDLIB__ -I"some include" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb -D__REDLIB__ -specs=redlib.specs -MMD -MP -MF"src/KISS_Server.d" -MT"src/KISS_Server.o" -MT"src/KISS_Server.d" -o "src/KISS_Server.o" "../src/KISS_Server.c"为什么我会得到这个错误?
我正在尝试为拥有Cortex-M3处理器的LPC1769编译
发布于 2015-05-27 07:18:12
对于arm-none-eabi,在独立环境(n1570,5.1.2.1)中,标头是可选的。不知道你使用的是哪个主机,但在Ubuntu 14.04上,标头位于/usr/lib/ gcc /arm-none-eabi/4.8.2/include中,对于gcc来说,只包含很少的标头。这是有道理的,因为没有stdlib可以提供printf & co。
但是,您也可以使用newlib,它提供stdlib和inttyes.h。另外,检查include (和library)路径。
https://stackoverflow.com/questions/30470232
复制相似问题