简体   繁体   English

Yocto 包含的 cmake-project 找不到 stdio.h

[英]Yocto included cmake-project can't find stdio.h

I'm trying to include a cmake-project into my yocto-build.我正在尝试将一个 cmake-project 包含到我的 yocto-build 中。 For this I have bundled the cmake-project into a.tar.gz-file and created a recipe.为此,我将 cmake-project 捆绑到 a.tar.gz-file 中并创建了一个配方。

The recipe looks like this:食谱如下所示:

DESCRIPTION = "Library for foo"
SECTION = "utils"
LICENSE = "closed"
LIC_FILES_CHKSUM = "file://COPYING;md5=eeafce4ba9a6b4ae7a5367c3b26e0182"

FILESEXTRAPATHS_prepend := "${THISDIR}/foo:"
SRC_URI = "file://foo.tar.gz"
S = "${WORKDIR}"

inherit pkgconfig cmake

When trying to build the image with bitbake, the compilation of foo fails:尝试使用 bitbake 构建映像时, foo的编译失败:

foo.c:2:10: fatal error: stdio.h: No such file or directory

It seems like the compiler can't find the necessary headers.编译器似乎找不到必要的标头。 How do I fix this?我该如何解决?

It would help to see foo.tar.gz.查看 foo.tar.gz 会有所帮助。

I guess it contains the CMakelists.txt file as well as the source code?我猜它包含 CMakelists.txt 文件以及源代码?

I don't think it's related to your problem, but in general it would be a good idea to keep your sources and your meta data separate.我认为这与您的问题无关,但总的来说,将您的来源和元数据分开是一个好主意。 I would put sources plys Cmakelists.txt in a repo and the OE/YP meta data in some meta layer.我会将来源 plys Cmakelists.txt 放在一个仓库中,并将 OE/YP 元数据放在某个元层中。

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

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