我正在尝试用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()中添加do_compile。同一问题
发布于 2017-04-13 13:09:30
您正在针对主机库进行链接,除非您正在构建一个本机包(实际上不是这样),否则这并不是正确的做法。
您需要为pjsip制作一个构建和安装它的菜谱,然后这个菜谱应该依赖于它。
发布于 2017-04-13 10:00:37
确保/usr/include/pjsua/pjsua.h文件存在。
# INC=-I/usr/include/pjsua-lib # not ok
INC=-I/usr/includehttps://stackoverflow.com/questions/43389115
复制相似问题