<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">The following article would be helpful for you. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><a href="http://stackoverflow.com/questions/2057472/howto-add-a-link-to-a-library-in-autoconf-configure-script-makefile">http://stackoverflow.com/questions/2057472/howto-add-a-link-to-a-library-in-autoconf-configure-script-makefile</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Best Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Zhenhua<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-bounces@yoctoproject.org]
<b>On Behalf Of </b>Priya Agarwal<br>
<b>Sent:</b> Thursday, March 19, 2015 5:07 PM<br>
<b>To:</b> meta-freescale@yoctoproject.org; yocto-builds@yoctoproject.org; yocto@yoctoproject.org<br>
<b>Subject:</b> Re: [meta-freescale] Including Static Libraries from sysroot in an autotools based package<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I need to link some libraries which are in sysroot into my source code. These are usdpaa libraries.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I added DEPENDS += "usdpaa" in .bb file.<br>
Apart from that also changed the Makefile.am of my source to include the following:<o:p></o:p></p>
</div>
<div style="margin-left:30.0pt">
<p class="MsoNormal">area_LDADD = -lusdpaa_of<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Then I ran aclocal, autoconf, automake --add-missing and retarred my package.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">When the package is being built from recipe, do_compile fails. It shows "undefined reference to" error.<o:p></o:p></p>
</div>
<p class="MsoNormal">So this means that libraries are not getting linked by just doing the above changes. What else I need to change?<br>
<br>
I think this problem is specific to autotools based projects as when I include the libraries during the gcc command they are easily included.<o:p></o:p></p>
<div style="margin-left:30.0pt">
<p class="MsoNormal"><br>
do_compile() {<br>
${CC} check.c -o check -lusdpaa_of<br>
}<o:p></o:p></p>
</div>
<p class="MsoNormal">link to <a href="http://area.bb" target="_blank">area.bb</a><br>
<a href="http://pastebin.com/Bef2C7nX" target="_blank">http://pastebin.com/Bef2C7nX</a><o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>