2017-04-13 31 views
0

我想編譯一個簡單的PJSIP程序與Yocto/Openembedded。我有這樣的錯誤:
fatal error: pjsua-lib/pjsua.h: No such file or directory
這是我的Makefile:
.h:沒有這樣的文件或目錄YOCTO/Openembedded

all: simple_pjsua 

simple_pjsua: simple_pjsua.c 
    $(CC) -o [email protected] $< `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它工作。

我該怎麼辦?

編輯:
我試着在do_compile加入export LD_LIBRARY_PATH=/usr/include()的BB文件。同一問題

回答

2

您正在鏈接主機庫,除非您正在構建本地軟件包(您不是),否則這確實不是正確的事情。

你需要爲pjsip製作和安裝配方,然後這個配方應該取決於此。

+0

謝謝!你是我的男人!我已經有了一個PJSIP層,我只是添加了'DEPENDS =「pjproject」',現在我的程序在我的主板上工作。再次感謝你 ! – Tagadac

0

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

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

謝謝你的幫助。同樣的錯誤和:'/ usr $ find -iname「pjsua.h」 ./local/include/pjsua-lib/pjsua.h ./local/include/pjsua.h ./include/pjsua-lib/pjsua .h 。/ include/pjsua.h' – Tagadac

+0

你必須包含你的bb路徑或其他地方,而不是makefile。 http://elinux.org/Bitbake_Cheat_Sheet – sailfish009

+0

這就是我正在尋找,但我無法找到.. – Tagadac

相關問題