Yocto元工具链致命错误:stdio.h:没有这样的文件或目录



问题:如何将标准库添加到arm-fslc-linux-gnueabi-gcc

背景: 我刚刚让bitbake编译Yocto项目中的meta-toolchain。 然后,我安装了生成的SDK工具链

$ ./build/tmp/deploy/sdk/fslc-framebuffer-glibc-x86_64-meta-toolchain-armv7at2hf-neon-toolchain-2.4.2.sh

然后在/opt/fslc-framebuffer/2.4.2/中安装了 SDK 工具链

然后,我可以轻松地运行可执行文件来获取正确的环境变量。

$ ./opt/fslc-framebuffer/2.4.2/environment-setup-armv7at2hf-neon-fslc-linux-gnueabi

我现在可以访问交叉编译器arm-fslc-linux-gnueabi-gcc

目前为止,一切都好。。。

然后,我从恩智浦下载了准系统SDK。 这是一件很棒的作品,但它可能有些过时了。首先解压缩文件,然后按照 SDK 自述文件中的步骤操作.pdf。

在自述文件之后.pdf我将执行以下操作: 若要生成 SDK,请使用根文件夹中的 ./tools/build_sdk 命令。我收到多个错误,但它们都与标准库有关,例如:

iMX6_Platform_SDK/sdk/drivers/accelerometer/src/mma8451.c:31:10: fatal error: string.h: No such file or directory #include <string.h> 
iMX6_Platform_SDK/sdk/include/sdk.h:40:10: fatal error: stdio.h: No such file or directory #include <stdio.h>

那么我该如何解决这个问题呢?我是交叉编译标准库还是在其他地方获取二进制文件?

yocto 构建的 SDK 与普通的 arm 工具链几乎没有什么不同。
我相信你用过
arm-fslc-linux-gnueabi-gcc hello.c
但实际上你需要使用如下Makefiles or Macros

${CC} hello.c -o hello

将其直接写入您的终端或将其放入生成文件中。

最新更新