<div><br><div class="gmail_quote"><div dir="auto">On Fri, Jul 21, 2017 at 6:43 PM Andre McCurdy <<a href="mailto:armccurdy@gmail.com">armccurdy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Jul 21, 2017 at 12:11 PM, Viditha Murahari<br>
<<a href="mailto:viditha@mpconsultants.org" target="_blank">viditha@mpconsultants.org</a>> wrote:<br>
> I'm new to yocto and bitbake and I'm building a voip application for a<br>
> custom imx6 board. I want to useĀ pjsip libraries to build my application, I<br>
> have compiled pjsip in my yocto build and generated pjsip libraries ( all<br>
> pjsip libraries r static). I'm having issues building a recipe for my<br>
> application that calls the pjsip functions. Below is how my recipe looks<br>
><br>
><br>
> Filename: <a href="http://rttapp.bb" rel="noreferrer" target="_blank">rttapp.bb</a><br>
><br>
> DESCRIPTION = "Simple voip application"<br>
> SECTION = "examples"<br>
> LICENSE = "MIT"<br>
> LIC_FILES_CHKSUM<br>
> ="file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"<br>
> PR = "r1"<br>
><br>
> SRC_URI += "file://rttapp.c"<br>
> SRC_URI += "file://include"<br>
> SRC_URI += "file://lib"<br>
><br>
> S = "${WORKDIR}"<br>
><br>
> CFLAGS_prepend += "-I${WORKDIR}/include -DPJ_AUTOCONF=1 -DPJ_IS_BIG_ENDIAN=0<br>
> -DPJ_IS_LITTLE_ENDIAN=1"<br>
> LDFLAGS_append += "-L${WORKDIR}/lib -lpjsua2-arm-poky-linux-gnueabi -lstdc++<br>
> -lpjsua-arm-poky-linux-gnueabi -lm -lrt -lpthread -lasound"<br>
><br>
> do_compile() {<br>
> ${CC} ${CFLAGS} ${LDFLAGS} rttapp.c -o rttapp<br>
<br>
Try splitting this into two commands. First compile rttapp.c to<br>
rttapp.o and then link the final application as a second step. When<br>
linking the application, ensure that rttapp.o is listed on the command<br>
line before the libraries which provide the symbols it requires.<br>
<br>
> }<br>
><br>
><br>
> When i do bitbake rttapp, the error i see is as below<br>
><br>
><br>
> Log data follows:<br>
> DEBUG: Executing shell function do_compile<br>
> /tmp/cc6nn4Dp.o: In function `main':<br>
> /usr/src/debug/rttapp/1.0-r1/rttapp.c:159: undefined reference to<br>
> `pjsua_create'<br>
> collect2: error: ld returned 1 exit status<br>
> WARNING: exit code 1 from a shell command.<br>
><br>
><br>
> Please advise</blockquote><div dir="auto"><br></div><div dir="auto">You are not having the said libraries in your workdir ensure that either you have them via fetcher or via depends</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
><br>
> --<br>
> _______________________________________________<br>
> bitbake-devel mailing list<br>
> <a href="mailto:bitbake-devel@lists.openembedded.org" target="_blank">bitbake-devel@lists.openembedded.org</a><br>
> <a href="http://lists.openembedded.org/mailman/listinfo/bitbake-devel" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/bitbake-devel</a><br>
><br>
--<br>
_______________________________________________<br>
bitbake-devel mailing list<br>
<a href="mailto:bitbake-devel@lists.openembedded.org" target="_blank">bitbake-devel@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/bitbake-devel" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/bitbake-devel</a><br>
</blockquote></div></div>