[meta-freescale] [yocto] Including Static Libraries from sysroot in an autotools based package
Khem Raj
raj.khem at gmail.com
Thu Mar 19 20:13:17 PDT 2015
> On Mar 19, 2015, at 2:07 AM, Priya Agarwal <priya_agarwal at students.iitmandi.ac.in> wrote:
>
> Hi,
>
> I need to link some libraries which are in sysroot into my source code. These are usdpaa libraries.
>
> I added DEPENDS += "usdpaa" in .bb file.
> Apart from that also changed the Makefile.am of my source to include the following:
> area_LDADD = -lusdpaa_of
> Then I ran aclocal, autoconf, automake --add-missing and retarred my package.
>
> When the package is being built from recipe, do_compile fails. It shows "undefined reference to" error.
> So this means that libraries are not getting linked by just doing the above changes. What else I need to change?
I think you need to specify them in Makefile.am using LDADD since it is using auto tools. Please take a look at Automake documentation
http://www.gnu.org/software/automake/manual/html_node/Linking.html <http://www.gnu.org/software/automake/manual/html_node/Linking.html>
might be helpful.
>
> I think this problem is specific to autotools based projects as when I include the libraries during the gcc command they are easily included.
>
> do_compile() {
> ${CC} check.c -o check -lusdpaa_of
> }
> link to area.bb <http://area.bb/>
> http://pastebin.com/Bef2C7nX <http://pastebin.com/Bef2C7nX>--
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20150319/5e17c1fb/attachment.html>
More information about the meta-freescale
mailing list