.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
这是我的制作文件:
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 制作一个配方来构建和安装它,然后这个配方应该依赖于它。
确保/usr/include/pjsua-lib/pjsua.h 文件存在。
# INC=-I/usr/include/pjsua-lib # not ok
INC=-I/usr/include
相关文章:
- 在Yocto上本地构建和编译C / C++程序
- Yocto-bitbake与SDK系统根冲突
- 在Yocto中使用Cmake构建Qt5
- 执行populate_sdk时如何使用yocto在本机系统根中安装文件?
- yocto opencv w/ gstreamer安装问题
- 如何在yocto上移植grpc-helloworld(CPP)示例
- VSCODE C++ IntelliSense为替代定义找到不相关的Yocto Sysroots
- 编译Yocto项目
- 将Qcharts模块安装到Yocto SDK
- Yocto中的C 程序
- .h:没有这样的文件或目录YOCTO/Openembedded
- 嵌入式系统中未显示的中文字符(yocto,Qt 5.5.1) - 为什么Qt不使用系统字体?
- 如何在Yocto构建的CMAKE项目中添加预处理器定义
- 运行Yocto的嵌入式系统的唯一ID
- 无法使用Yocto生成适用于Windows的SDK
- 如何在Yocto中多次构建相同的库