<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Add static library (.a) to project</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67365/add-static-library-a-to-project</link><description>Hi, 
 I&amp;#39;m trying to link a static library that provided by others to my own project. I followed the steps in this post ( https://devzone.nordicsemi.com/f/nordic-q-a/39338/segger-studio-static-library-adding-to-linker ) but I got the error &amp;#39;undefined reference</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 23 Oct 2020 12:25:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67365/add-static-library-a-to-project" /><item><title>RE: Add static library (.a) to project</title><link>https://devzone.nordicsemi.com/thread/276623?ContentTypeID=1</link><pubDate>Fri, 23 Oct 2020 12:25:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05f54288-51ec-45aa-96e6-780292fc1337</guid><dc:creator>ArnoldZy</dc:creator><description>&lt;p&gt;Hi Heidi,&lt;/p&gt;
&lt;p&gt;The error says: .../src/main.c:237: undefined reference to `get_sleep_time&amp;#39;&lt;br /&gt;1&amp;gt; collect2.exe: error: ld returned 1 exit status&lt;/p&gt;
&lt;p&gt;&amp;#39;get_sleep_time&amp;#39; was the API I tried to used from the static library.&lt;/p&gt;
&lt;p&gt;But I tried to include another library using the same method and it works well, seems like its the problem with this library itself? I will double check, but thank you for shaing the sample.&lt;/p&gt;
&lt;p&gt;Arno&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add static library (.a) to project</title><link>https://devzone.nordicsemi.com/thread/276457?ContentTypeID=1</link><pubDate>Thu, 22 Oct 2020 13:11:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee0a4dcb-de50-4632-be1d-37458f696230</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]but I got the error &amp;#39;undefined reference&amp;#39; when I try to use the APIs from that library.[/quote]
&lt;p&gt;&amp;nbsp;What does the error (or errors) say specifically?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Zephyr has a sample called &amp;quot;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/application_development/external_lib/README.html"&gt;External library&lt;/a&gt;&amp;quot;&lt;span&gt;&amp;nbsp;that demonstrates how to include an external static library into the Zephyr build system.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Heidi&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>