简体   繁体   中英

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

I'm trying to include a cmake-project into my yocto-build. For this I have bundled the cmake-project into a.tar.gz-file and created a recipe.

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:

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.

I guess it contains the CMakelists.txt file as well as the source code?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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