<?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>Problems adding cJson library</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54543/problems-adding-cjson-library</link><description>Hi, 
 
 I need to use cJson library to parse some json data. I have seen that the library is located at &amp;quot;nrf\ext\cjson&amp;quot; path. I have also seen how to add that library to a project . However, I have not the option &amp;quot;Preprocessor&amp;quot; in my &amp;quot;options&amp;quot; menu. To</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Nov 2019 16:52:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54543/problems-adding-cjson-library" /><item><title>RE: Problems adding cJson library</title><link>https://devzone.nordicsemi.com/thread/221152?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2019 16:52:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d497efb6-393c-417e-84a8-5ff3fb56cb84</guid><dc:creator>isurki</dc:creator><description>&lt;p&gt;Hi;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you, that worked!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems adding cJson library</title><link>https://devzone.nordicsemi.com/thread/221039?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2019 11:25:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3926c8f-a5d2-4030-a3d5-de31cd43ef27</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That is a standard library header, which does not seem to be implemented in the minimal libc revision that you&amp;#39;re using.&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll need to switch your libc to newlibc. This can be done by adding:&lt;/p&gt;
&lt;p&gt;CONFIG_NEWLIB_LIBC=y&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems adding cJson library</title><link>https://devzone.nordicsemi.com/thread/220934?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2019 17:37:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87fc726c-3f4f-40c5-bf50-b43c28875b09</guid><dc:creator>isurki</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have edited my prj.conf to add&amp;nbsp;&lt;span&gt;CONFIG_CJSON_LIB=y and then included&amp;nbsp;#include &amp;lt;cJSON.h&amp;gt; to my main program. When I compile the program a cJson.c file opens in Segger and I get an error saying that &amp;quot;math.h&amp;quot; file is missing.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have not found &amp;quot;math.h&amp;quot; file&amp;nbsp;in any path... do I have to download it from Github? In that case, how do I add it to my project?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks a lot.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems adding cJson library</title><link>https://devzone.nordicsemi.com/thread/220759?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2019 09:36:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bafc2281-7924-42a6-9086-a253b9137629</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To add cjson to your project, you can add CONFIG_CJSON_LIB=y to your prj.conf, then reimport the project.&lt;/p&gt;
&lt;p&gt;Could you try this and see if it works?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>