<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic extern &amp;quot;C&amp;quot; linkage for KSDK headers in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/extern-quot-C-quot-linkage-for-KSDK-headers/m-p/641945#M6902</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could someone working on the next version of the Kinetis Connectivity Software SDK make sure that all of the headers are conditionally-wrapped for C linkage?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;PRE&gt;#ifdef __cplusplus
extern "C" {
#endif

...

#ifdef __cplusplus
}
#endif&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This isn't currently the case with most of the headers from the&amp;nbsp;v1.0.2 Connectivity Software SDK.&lt;/P&gt;&lt;P&gt;Not exposing using C linkage leads to the usual errors when called from C++ files:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE&gt;./source/Coordinator.o: In function `MLME_NWK_SapHandler(nwkMessage_tag*, unsigned long)':
/../source/Coordinator.cpp:929: undefined reference to `ListAddTailMsg(list_tag*, void*)'
./source/Coordinator.o: In function `MCPS_NWK_SapHandler(mcpsToNwkMessage_tag*, unsigned long)':
/../source/Coordinator.cpp:937: undefined reference to `ListAddTailMsg(list_tag*, void*)'
./source/Coordinator.o: In function `App_init':
/../source/Coordinator.cpp:964: undefined reference to `ListInit(list_tag*, unsigned long)'
/../source/Coordinator.cpp:965: undefined reference to `ListInit(list_tag*, unsigned long)'
/../source/Coordinator.cpp:968: undefined reference to `Mac_SetExtendedAddress(unsigned char*, unsigned long)'
./source/Coordinator.o: In function `AppThread(void*)':
/../source/Coordinator.cpp:1017: undefined reference to `ListRemoveHeadMsg(list_tag*)'
/../source/Coordinator.cpp:1150: undefined reference to `ListRemoveHeadMsg(list_tag*)'
./source/Coordinator.o: In function `coordinator_main_task':
/../source/Coordinator.cpp:1203: undefined reference to `TMR_Init()'
/../source/Coordinator.cpp:1205: undefined reference to `SecLib_Init()'
/../source/Coordinator.cpp:1208: undefined reference to `RNG_Init()'&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added this wrapping to copies of the headers in my project (cloned with the Project Cloner), but it would be great to see this upstream.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Dec 2016 21:52:36 GMT</pubDate>
    <dc:creator>maxv</dc:creator>
    <dc:date>2016-12-26T21:52:36Z</dc:date>
    <item>
      <title>extern "C" linkage for KSDK headers</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/extern-quot-C-quot-linkage-for-KSDK-headers/m-p/641945#M6902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could someone working on the next version of the Kinetis Connectivity Software SDK make sure that all of the headers are conditionally-wrapped for C linkage?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;PRE&gt;#ifdef __cplusplus
extern "C" {
#endif

...

#ifdef __cplusplus
}
#endif&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This isn't currently the case with most of the headers from the&amp;nbsp;v1.0.2 Connectivity Software SDK.&lt;/P&gt;&lt;P&gt;Not exposing using C linkage leads to the usual errors when called from C++ files:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE&gt;./source/Coordinator.o: In function `MLME_NWK_SapHandler(nwkMessage_tag*, unsigned long)':
/../source/Coordinator.cpp:929: undefined reference to `ListAddTailMsg(list_tag*, void*)'
./source/Coordinator.o: In function `MCPS_NWK_SapHandler(mcpsToNwkMessage_tag*, unsigned long)':
/../source/Coordinator.cpp:937: undefined reference to `ListAddTailMsg(list_tag*, void*)'
./source/Coordinator.o: In function `App_init':
/../source/Coordinator.cpp:964: undefined reference to `ListInit(list_tag*, unsigned long)'
/../source/Coordinator.cpp:965: undefined reference to `ListInit(list_tag*, unsigned long)'
/../source/Coordinator.cpp:968: undefined reference to `Mac_SetExtendedAddress(unsigned char*, unsigned long)'
./source/Coordinator.o: In function `AppThread(void*)':
/../source/Coordinator.cpp:1017: undefined reference to `ListRemoveHeadMsg(list_tag*)'
/../source/Coordinator.cpp:1150: undefined reference to `ListRemoveHeadMsg(list_tag*)'
./source/Coordinator.o: In function `coordinator_main_task':
/../source/Coordinator.cpp:1203: undefined reference to `TMR_Init()'
/../source/Coordinator.cpp:1205: undefined reference to `SecLib_Init()'
/../source/Coordinator.cpp:1208: undefined reference to `RNG_Init()'&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added this wrapping to copies of the headers in my project (cloned with the Project Cloner), but it would be great to see this upstream.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2016 21:52:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/extern-quot-C-quot-linkage-for-KSDK-headers/m-p/641945#M6902</guid>
      <dc:creator>maxv</dc:creator>
      <dc:date>2016-12-26T21:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: extern "C" linkage for KSDK headers</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/extern-quot-C-quot-linkage-for-KSDK-headers/m-p/641946#M6903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Max,&lt;/P&gt;&lt;P&gt;I will report the bug to SDK development team so that they can have a check.&lt;/P&gt;&lt;P&gt;Thank you for pointing out the issue.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Dec 2016 02:51:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/extern-quot-C-quot-linkage-for-KSDK-headers/m-p/641946#M6903</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-12-29T02:51:41Z</dc:date>
    </item>
  </channel>
</rss>

