首页 > 解决方案 > 在 Yocto SDK do_populate 中找不到 ncurses 错误 iostream.h

问题描述

我是 Linux 和 Yocto 项目的新手。我目前正在尝试为 minnow 板构建自定义图像。我已经设法使用 bitbake 为电路板创建图像

但是,当我执行 bitbake -c do_populate_sdk 时,我在 ncurses 中遇到了编译问题:

../../../git/c++/cursespad.cc -o ../obj_s/cursespad.o
| In file included from ../../../git/c++/cursesw.h:40,
|                  from ../../../git/c++/cursesp.h:39,
|                  from ../../../git/c++/cursesm.h:39,
|                  from ../../../git/c++/cursesm.cc:35:
| ../c++/etip.h:341:15: fatal error: iostream.h: No such file or directory
 341 | #     include <iostream.h>

不知道我哪里出错了。考虑到我是新手,任何帮助将不胜感激。我不明白为什么我应该在创建 sdk 时遇到编译错误,在成功构建完整映像之后

我正在使用 poky-zeus-22.0.2。它包含 ncurses 版本 6.1+20190803-r0

标签: linuxsdkyoctobitbake

解决方案


原来问题是https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129中描述的

问题在于 -I 和 -isystem 具有相同的引用路径

在我在 bitbake.conf 中更改以下内容后,问题(以及未找到 stdlib.h 的另一个相关问题)得到解决:

BUILDSDK_CPPFLAGS = "-isystem${STAGING_INCDIR}" 到 BUILDSDK_CPPFLAGS = ""


推荐阅读