<?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>nrf connect sdk C++ project</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83992/nrf-connect-sdk-c-project</link><description>Hi everybody! 
 I&amp;#39;m starting to study nrf9160. Work in SEEGER Embedded Studio. And I immediately had a question: 
 By default, it is created C project, But I want to create a C++ project. How to do it??? 
 I also want to add some arduino libraries to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Feb 2025 04:25:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83992/nrf-connect-sdk-c-project" /><item><title>RE: nrf connect sdk C++ project</title><link>https://devzone.nordicsemi.com/thread/521441?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2025 04:25:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd683486-421e-4d9e-b2a2-e0496214cb29</guid><dc:creator>akay47</dc:creator><description>&lt;p&gt;Thank you one more question on this, I have this directory structure (some screenshots attached)&amp;nbsp;for led blink and these files&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#include&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;zephyr/kernel.h&amp;gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;#include&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;zephyr/drivers/gpio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;give me error that no such file or directory?&lt;br /&gt;but at the same time if i keep them in main.cpp file i dont see such issue. any idea why is that?&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1738729482383v3.png" alt=" " /&gt;&lt;br /&gt;main cmakelists&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1738729453099v2.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;drv_led&amp;#39;s cmakelists:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1738729522357v4.png" alt=" " /&gt;&lt;br /&gt;app/cmakelists:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1738729541685v5.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf connect sdk C++ project</title><link>https://devzone.nordicsemi.com/thread/349581?ContentTypeID=1</link><pubDate>Tue, 25 Jan 2022 14:31:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4b7fdb8-f8d2-41f7-8e62-2f8f224acc4f</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;We have several samples in the nRF Connect SDK (NCS)/Zephyr using C++, study these samples to get an understanding of how to use C++ in NCS.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v1.8.0/samples/matter/light_bulb/src"&gt;https://github.com/nrfconnect/sdk-nrf/tree/v1.8.0/samples/matter/light_bulb/src&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v1.8.0/samples/matter/lock"&gt;https://github.com/nrfconnect/sdk-nrf/tree/v1.8.0/samples/matter/lock&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/v2.7.0-ncs1/samples/subsys/cpp/cpp_synchronization"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/v2.7.0-ncs1/samples/subsys/cpp/cpp_synchronization&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You may check out these links as well:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/zephyr/reference/kernel/other/cxx_support.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/zephyr/reference/kernel/other/cxx_support.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/31281"&gt;https://github.com/zephyrproject-rtos/zephyr/issues/31281&lt;/a&gt;&lt;/p&gt;
[quote user=""]I also want to add some arduino libraries to the project.&amp;nbsp;For example Arduino String support.&amp;nbsp;&lt;span&gt;How to do it?&lt;/span&gt;[/quote]
&lt;p&gt;Instead of copying in Arduino libraries, it may be a better approach to use the already present drivers/libraries/subsystems in NCS/Zephyr if possible.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/v2.7.0-ncs1/drivers"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/v2.7.0-ncs1/drivers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/v2.7.0-ncs1/subsys"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/v2.7.0-ncs1/subsys&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>