<?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>CLI in C++ project</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50890/cli-in-c-project</link><description>Hi, 
 I&amp;#39;m trying to port a project using nRF5 SDK to C++. One of the desired features would be interaction with the app via J-Link RTT using the command line interface. 
 CLI library is very easy to use, but it&amp;#39;s also very hard-wired to C programming</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Aug 2019 20:18:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50890/cli-in-c-project" /><item><title>RE: CLI in C++ project</title><link>https://devzone.nordicsemi.com/thread/204365?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2019 20:18:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26e32a17-331e-4043-a66c-a3c89bdadf98</guid><dc:creator>jakub</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you are using GCC there is already a solution waiting for you. Please check this topic:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/24745/c-compilation-error-using-cli-with-sdk-14-error-expected-declaration-before-token/173900#173900"&gt;devzone.nordicsemi.com/.../173900&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI in C++ project</title><link>https://devzone.nordicsemi.com/thread/203578?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 12:21:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c48c6dd-bf9f-4d41-a96c-b46bd2519060</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;In general, there is no reason to not use C++ with nRF but C++ and C doensn&amp;#39;t mix always very well. I would try to seperate such an application into a C part and into a C++ part. With your CLI example, try to split the application into a set of extern &amp;quot;C&amp;quot; C++ functions and a C part, that ueses the CLI library which then calls the C++ functions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI in C++ project</title><link>https://devzone.nordicsemi.com/thread/203575?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 12:17:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43d68e2f-4f31-44d6-bbaa-7160f67ff4bb</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The nRF5 SDK does not support C++, and as you have seen there are quite a few modules that are not easily converted to valid C++ code. This means that you would want to keep the SDK code as C even if you write the rest of your application as C++. You also have to write some glue code and rewrite parts of the CLI code to handle the incompatibilities. Unfortunately, we have not done this task, and do not have a guide.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>