<?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>undefined reference to ble_dis_init</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18145/undefined-reference-to-ble_dis_init</link><description>Hi, 
 I am using SEGGER Embedded Studio 3.10h on OS X and SDK 12.1.0. I get this error 
 main.c:614: undefined reference to `ble_dis_init&amp;#39; 
 even though I have: 
 
 
 added #include &amp;quot;ble_dis.h&amp;quot; 
 
 
 added ble_dis.c to the project (trying in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Dec 2016 08:32:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18145/undefined-reference-to-ble_dis_init" /><item><title>RE: undefined reference to ble_dis_init</title><link>https://devzone.nordicsemi.com/thread/70027?ContentTypeID=1</link><pubDate>Mon, 12 Dec 2016 08:32:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8886bcbb-2d3c-4096-bd37-81b170b264d8</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Great that you got it working an reported back the answer!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to ble_dis_init</title><link>https://devzone.nordicsemi.com/thread/70028?ContentTypeID=1</link><pubDate>Sat, 10 Dec 2016 17:04:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fccaab5c-44d1-4337-b5e6-51dd6af5d1f1</guid><dc:creator>fab</dc:creator><description>&lt;p&gt;I eventually got it. I had two different sdk_config.h in my project (please, don&amp;#39;t ask me why!). Unfortunately I was modifying the wrong one. Thx for your support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to ble_dis_init</title><link>https://devzone.nordicsemi.com/thread/70029?ContentTypeID=1</link><pubDate>Sat, 10 Dec 2016 07:05:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d9f5431-3330-48c4-8794-d52c3bf1d614</guid><dc:creator>fab</dc:creator><description>&lt;p&gt;I originally started my project importing ble_app_template, then I largely changed it. I have tried to import the HRS example and it works fine. My opinion is that, for some reason,  ble_dis.c is ignored during compilation because no code size is reported for it.
I noticed that my project misses the nRF_BLE_Services folder, as far I understand it should be just a way of grouping files together, though.
Any suggestion would be appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to ble_dis_init</title><link>https://devzone.nordicsemi.com/thread/70026?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 11:58:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3cced1c-2425-4516-bfd8-2b09ce096d09</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Are you trying to import a project from Keil or are you creating a project from scratch? I tried importing the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/ble_sdk_app_hrs.html?cp=4_0_1_4_2_2_8"&gt;HRS example&lt;/a&gt; from SDK 12 (which includes DIS servuice) by &lt;a href="https://devzone.nordicsemi.com/blogs/1032/segger-embedded-studio-a-cross-platform-ide-w-no-c/"&gt;following this guide&lt;/a&gt;, and that works fine. Can you try to do the same and see if that works, to determine if there is something wrong with the setup in SES?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to ble_dis_init</title><link>https://devzone.nordicsemi.com/thread/70025?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 06:25:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a07fc6f-3b86-44ad-91bb-4f476170ca87</guid><dc:creator>fab</dc:creator><description>&lt;p&gt;Unfortunately, I cannot share the project at this stage. I have double checked:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;BLE_DIS_ENABLED 1, defined only once (sdk_config.h)&lt;/li&gt;
&lt;li&gt;ble_dis.h is in the project path (this was not there before, but it didn&amp;#39;t get any compilation error!)&lt;/li&gt;
&lt;li&gt;ble_dis.c is in the nRF_BLE group, only one ble_s.c in the project. If I try to add another, SES gives a duplication warning. Removed and then added again.&lt;/li&gt;
&lt;li&gt;sdk_config.h included in the project
Apparently everything is properly set, but I still get the error &amp;quot;undefined reference to `ble_dis_init&amp;#39;&amp;quot;
Thx&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to ble_dis_init</title><link>https://devzone.nordicsemi.com/thread/70023?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2016 12:12:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e70c11eb-9605-4cdf-b8b9-fa0f460db5bf</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Did you include the path to &lt;em&gt;ble_dis.h&lt;/em&gt; in your SES project? an you try to remove the &lt;em&gt;ble_dis.c&lt;/em&gt; file (make sure you have not added multiple copies), and add it again? Also make sure the &lt;em&gt;sdk_config.h&lt;/em&gt; file is included in the project and that &lt;code&gt;BLE_DIS_ENABLED&lt;/code&gt; is not set anywhere else in your project. Could you upload you project here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to ble_dis_init</title><link>https://devzone.nordicsemi.com/thread/70024?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2016 06:17:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de07a5bc-27b3-4061-a480-1881ef81d56a</guid><dc:creator>fab</dc:creator><description>&lt;p&gt;Hi Jørgen, thank you for your help. I forgot to mention it but yes, I did #define BLE_DIS_ENABLED 1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to ble_dis_init</title><link>https://devzone.nordicsemi.com/thread/70022?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 08:05:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47c48e35-1b4f-434c-9166-99d95c057680</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you enable the BLE DIS service in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/sdk_config.html?cp=4_0_0_1_6"&gt;SDK configuration header file&lt;/a&gt;? &lt;code&gt;#define BLE_DIS_ENABLED 1&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>