<div><br><div class="gmail_quote"><div dir="auto">On Fri, Jul 21, 2017 at 6:43 PM Andre McCurdy &lt;<a href="mailto:armccurdy@gmail.com">armccurdy@gmail.com</a>&gt; 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>
&lt;<a href="mailto:viditha@mpconsultants.org" target="_blank">viditha@mpconsultants.org</a>&gt; wrote:<br>
&gt; I&#39;m new to yocto and bitbake and I&#39;m building a voip application for a<br>
&gt; custom imx6 board. I want to useĀ  pjsip libraries to build my application, I<br>
&gt; have compiled pjsip in my yocto build and generated pjsip libraries ( all<br>
&gt; pjsip libraries r static). I&#39;m having issues building a recipe for my<br>
&gt; application that calls the pjsip functions. Below is how my recipe looks<br>
&gt;<br>
&gt;<br>
&gt; Filename: <a href="http://rttapp.bb" rel="noreferrer" target="_blank">rttapp.bb</a><br>
&gt;<br>
&gt; DESCRIPTION = &quot;Simple voip application&quot;<br>
&gt; SECTION = &quot;examples&quot;<br>
&gt; LICENSE = &quot;MIT&quot;<br>
&gt; LIC_FILES_CHKSUM<br>
&gt; =&quot;file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302&quot;<br>
&gt; PR = &quot;r1&quot;<br>
&gt;<br>
&gt; SRC_URI += &quot;file://rttapp.c&quot;<br>
&gt; SRC_URI += &quot;file://include&quot;<br>
&gt; SRC_URI += &quot;file://lib&quot;<br>
&gt;<br>
&gt; S = &quot;${WORKDIR}&quot;<br>
&gt;<br>
&gt; CFLAGS_prepend += &quot;-I${WORKDIR}/include -DPJ_AUTOCONF=1 -DPJ_IS_BIG_ENDIAN=0<br>
&gt; -DPJ_IS_LITTLE_ENDIAN=1&quot;<br>
&gt; LDFLAGS_append += &quot;-L${WORKDIR}/lib -lpjsua2-arm-poky-linux-gnueabi -lstdc++<br>
&gt; -lpjsua-arm-poky-linux-gnueabi -lm -lrt -lpthread -lasound&quot;<br>
&gt;<br>
&gt; do_compile() {<br>
&gt; ${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>
&gt; }<br>
&gt;<br>
&gt;<br>
&gt; When i do bitbake rttapp, the error i see is as below<br>
&gt;<br>
&gt;<br>
&gt; Log data follows:<br>
&gt; DEBUG: Executing shell function do_compile<br>
&gt; /tmp/cc6nn4Dp.o: In function `main&#39;:<br>
&gt; /usr/src/debug/rttapp/1.0-r1/rttapp.c:159: undefined reference to<br>
&gt; `pjsua_create&#39;<br>
&gt; collect2: error: ld returned 1 exit status<br>
&gt; WARNING: exit code 1 from a shell command.<br>
&gt;<br>
&gt;<br>
&gt; 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>
&gt;<br>
&gt; --<br>
&gt; _______________________________________________<br>
&gt; bitbake-devel mailing list<br>
&gt; <a href="mailto:bitbake-devel@lists.openembedded.org" target="_blank">bitbake-devel@lists.openembedded.org</a><br>
&gt; <a href="http://lists.openembedded.org/mailman/listinfo/bitbake-devel" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/bitbake-devel</a><br>
&gt;<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>