.h: 没有那个文件或目录 YOCTO/Openembedded

.h: No such file or directory YOCTO/Openembedded

我正在尝试用 Yocto/Openembedded 编译一个简单的 PJSIP 程序。我有这个错误:
fatal error: pjsua-lib/pjsua.h: No such file or directory
这是我的 Makefile:

all: simple_pjsua

simple_pjsua: simple_pjsua.c
    $(CC) -o $@ $< `pkg-config --cflags --libs libpjproject`

clean:
    rm -f simple_pjsua.o simple_pjsua

这是我的 simplepjsua_2.6.bb:

DESCRIPTION = "Open source SIP stack and media stack for presence, im/instant \
               messaging, and multimedia communication"
SECTION = "libs"
HOMEPAGE = "http://www.pjsip.org/"
# there are various 3rd party sources which may or may not be part of the
# build, there license term vary or are not explicitely specified.
LICENSE = "CLOSED"

PR = "r0"

SRC_URI = "file://simple_pjsua.c \
           file://Makefile \
           file://README.txt"

S = "${WORKDIR}/"

do_compile() {
    cd ${S}
    #to prevent libpjproject.PC not found error
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    oe_runmake
}

do_install() {
        install -m 0755 -d ${D}${bindir} ${D}${docdir}/simple_pjsua
        install -m 0755 ${S}/simple_pjsua ${D}${bindir}
        install -m 0755 ${WORKDIR}/README.txt ${D}${docdir}/simple_pjsua
}

我尝试在 Makefile 中添加 INC=-I/usr/include/pjsua-lib/ 但没有任何改变。如果我想在我的计算机上使用 make 编译它,它正在工作。

我能做什么?

编辑:
我尝试在 bb 文件的 do_compile() 中添加 export LD_LIBRARY_PATH=/usr/include 。同样的问题

确保 /usr/include/pjsua-lib/pjsua.h 文件存在。

# INC=-I/usr/include/pjsua-lib # not ok
INC=-I/usr/include

你正在链接主机库,这真的不是正确的做法,除非你正在构建一个本地包(你不是)。

您需要为 pjsip 制作一个配方来构建和安装它,然后这个配方应该依赖于它。