[meta-freescale] Including Static Libraries from sysroot in an autotools based package

zhenhua.luo at freescale.com zhenhua.luo at freescale.com
Thu Mar 19 19:56:40 PDT 2015


The following article would be helpful for you.

http://stackoverflow.com/questions/2057472/howto-add-a-link-to-a-library-in-autoconf-configure-script-makefile


Best Regards,

Zhenhua

From: meta-freescale-bounces at yoctoproject.org [mailto:meta-freescale-bounces at yoctoproject.org] On Behalf Of Priya Agarwal
Sent: Thursday, March 19, 2015 5:07 PM
To: meta-freescale at yoctoproject.org; yocto-builds at yoctoproject.org; yocto at yoctoproject.org
Subject: Re: [meta-freescale] Including Static Libraries from sysroot in an autotools based package

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 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20150320/a85078cd/attachment-0001.html>


More information about the meta-freescale mailing list