<?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>Getting an undefined reference error for a defined function</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72591/getting-an-undefined-reference-error-for-a-defined-function</link><description>SDK 14.2, S140, NRF52840 
 I was trying to use the low_power_pwm library but upon copying the code from the lpp example, I get this: 
 Linking ble_bse_pca10056_s40.elf, 4 errors 
 &amp;quot;C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.30/gcc/arm-none</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Mar 2021 20:53:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72591/getting-an-undefined-reference-error-for-a-defined-function" /><item><title>RE: Getting an undefined reference error for a defined function</title><link>https://devzone.nordicsemi.com/thread/299125?ContentTypeID=1</link><pubDate>Wed, 10 Mar 2021 20:53:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a58a1d2d-a42d-46cc-9009-5a1cc04fa77f</guid><dc:creator>nordev</dc:creator><description>&lt;p&gt;Never mind, the issue was that&amp;nbsp;#define LOW_POWER_PWM_ENABLED&amp;nbsp;&lt;/p&gt;
&lt;p&gt;was originally 0 and needed to be 1 in sdk_config&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting an undefined reference error for a defined function</title><link>https://devzone.nordicsemi.com/thread/299099?ContentTypeID=1</link><pubDate>Wed, 10 Mar 2021 16:29:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1adc8a7-f734-4ec2-a316-31584940bd6e</guid><dc:creator>nordev</dc:creator><description>&lt;p&gt;It was already there when I had this problem, so it seems like something else is wrong...&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1615393712588v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, I have had that problem before, where the right paths are not included in the User Include Directories. The compilation error that happens in this case is&amp;nbsp;instead &amp;quot;&amp;lt;file path&amp;gt;: no such file or directory.&amp;quot;&lt;/p&gt;
&lt;p&gt;The error I am getting is:&amp;nbsp;&lt;span&gt;&amp;quot;undefined reference to &amp;lt;function name&amp;gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting an undefined reference error for a defined function</title><link>https://devzone.nordicsemi.com/thread/298939?ContentTypeID=1</link><pubDate>Wed, 10 Mar 2021 09:45:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:022cd839-fe44-402d-835c-df88a20fa7e4</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You must also add the path of the header file&amp;nbsp;low_power_pwm.h to user include directories in SES.&amp;nbsp;You can do this by right clicking on your project in the project explorer in SES, &amp;quot;Project &amp;#39;&amp;lt;project_name&amp;gt;&amp;#39;&amp;quot;, and then selecting Options &amp;gt; Preprocessor &amp;gt; User Include Directories. Make sure that configurations is set to common, and not debug or release. Please note that you need to have the correct depth of the path, so you must have enough &amp;quot;../../../&amp;quot; before the folder the header file is located in. You can compare with the other user include directories to see how you should add this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>