gpt4 book ai didi

c++ - .h : No such file or directory YOCTO/Openembedded

转载 作者:行者123 更新时间:2023-11-28 01:50:04 24 4
gpt4 key购买 nike

我正在尝试使用 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 。同样的问题

最佳答案

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

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

关于c++ - .h : No such file or directory YOCTO/Openembedded,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43389115/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com