<?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 Re: Using c++ in MQX project in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175917#M2317</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;yes I did. it didnt help. I found the following changes for coldfire but not for kinetis (ARM) family. &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in Project -&amp;gt; Properties -&amp;gt; C/C++ Build -&amp;gt; Settings -&amp;gt; Librarian&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set “Model” to “ewl_c++”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in Project -&amp;gt; Properties -&amp;gt; C/C++ Build -&amp;gt; Settings -&amp;gt; ColdFire Compiler -&amp;gt; Input&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add "${MCUToolsBaseDir}/ColdFire_Support/ewl/EWL_C++/include" in “System Path”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in Project -&amp;gt; Properties -&amp;gt; C/C++ Build -&amp;gt; Settings -&amp;gt; ColdFire Compiler -&amp;gt; Language Settings&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; check “Force C++ Compilation”&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; check “Enable C++ Exceptions”&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; check “Enable RTTI”&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2012 18:04:28 GMT</pubDate>
    <dc:creator>amleng</dc:creator>
    <dc:date>2012-11-15T18:04:28Z</dc:date>
    <item>
      <title>Using c++ in MQX project</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175915#M2315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to use c++ classes in my mqx project. I have file system, rtcs and usb middlewares in this project. I added a cpp file to the project but I get error on brackets! I'm sure the notation/syntax is correct. I use CW 10.2. I enabled cpp in bsp as well. any suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2012 21:52:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175915#M2315</guid>
      <dc:creator>amleng</dc:creator>
      <dc:date>2012-11-14T21:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using c++ in MQX project</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175916#M2316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BSPCFG_ENABLE_CPP is set to 1 and was rebuilded bsp? Have you tried to turn on a setting "Force C++ compilation"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 06:45:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175916#M2316</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2012-11-15T06:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using c++ in MQX project</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175917#M2317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;yes I did. it didnt help. I found the following changes for coldfire but not for kinetis (ARM) family. &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in Project -&amp;gt; Properties -&amp;gt; C/C++ Build -&amp;gt; Settings -&amp;gt; Librarian&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set “Model” to “ewl_c++”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in Project -&amp;gt; Properties -&amp;gt; C/C++ Build -&amp;gt; Settings -&amp;gt; ColdFire Compiler -&amp;gt; Input&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add "${MCUToolsBaseDir}/ColdFire_Support/ewl/EWL_C++/include" in “System Path”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in Project -&amp;gt; Properties -&amp;gt; C/C++ Build -&amp;gt; Settings -&amp;gt; ColdFire Compiler -&amp;gt; Language Settings&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; check “Force C++ Compilation”&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; check “Enable C++ Exceptions”&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; check “Enable RTTI”&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 18:04:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175917#M2317</guid>
      <dc:creator>amleng</dc:creator>
      <dc:date>2012-11-15T18:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using c++ in MQX project</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175918#M2318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what I need to do is mixing C with C++ in a MQX project using CW 10.2 on K60 platform. I wont use C++ library function but I need to use classes and other OO concepts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 18:09:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175918#M2318</guid>
      <dc:creator>amleng</dc:creator>
      <dc:date>2012-11-15T18:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using c++ in MQX project</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175919#M2319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sina Moshksar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create new simple c++ application with two classes for instance which links your MQX libs (I would start only with bsp/psp) and build it if it passes without any error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have no much information what errors you run into. If I build new application with some c++ syntax for k60 in CW 10.2, application builds without errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 07:14:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175919#M2319</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2012-11-16T07:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using c++ in MQX project</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175920#M2320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martink,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two basic question here:&lt;/P&gt;&lt;P&gt;1- how can I &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;create new simple c++ application?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;2- What do you mean by link MQX libs? How can I link bsp/psp to the application? isn't it done automatically during project creation?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 17:18:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175920#M2320</guid>
      <dc:creator>amleng</dc:creator>
      <dc:date>2012-11-16T17:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using c++ in MQX project</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175921#M2321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In MQX 3.8.1, build MQX libs with #define BSP_ENABLE_CPP 1 in your user_config.h.&lt;/P&gt;&lt;P&gt;Now refer to the example application called "cplus".&lt;BR /&gt;c:\Freescale\Freescale MQX 3.8\mqx\examples\cplus\&lt;BR /&gt;This one is hello world type of an application using MQX in C++.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ad 1.&lt;BR /&gt;either: create new bare metal project and then add MQX *.h and *.a file (header and libs) of your board (in the \lib\&amp;lt;board_name&amp;gt;.&amp;lt;compiler&amp;gt; folder of your MQX installation directory)&lt;BR /&gt;to the compiler, assembler and linker properties of your build target.&lt;/P&gt;&lt;P&gt;or: use CW 10.2 New Project Wizard to create a new MQX 3.8 application, select your board and then example "cplus" project. This will create a new "cplus" application in your workspace, with all compiler, assembler and linker properties already set up for linkage with MQX 3.8.1 libraries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ad 2.&lt;BR /&gt;If you create a new bare metal application, you shall configure properties of compiler/assembler/linker manually in the properties of your build target.&lt;BR /&gt;If you create a new MQX 3.8 application, the new project wizard will configure the paths to the MQX header files and libraries for your &amp;lt;board_name&amp;gt;.&amp;lt;compiler&amp;gt; automatically.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If you're mixing C++ and C source files:&lt;BR /&gt;-make sure names of the source file(s) are not shared, for example, hello.cpp and hello.c should not be in one project&lt;BR /&gt;-you can call C functions from C++ source file. you just need to tell the C++ compiler that it should link the C function as a C object, using keyword: extern "C"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 07:20:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175921#M2321</guid>
      <dc:creator>Martin_</dc:creator>
      <dc:date>2012-11-19T07:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using c++ in MQX project</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175922#M2322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Which version of CW you are using? Special Edition (free) does not support C++.&lt;/P&gt;&lt;P&gt;At C++ project creation there is a mention:&lt;/P&gt;&lt;P&gt;"C++ is only available with the Professional Edition and the Standard Edition when the Enhanced Compiler Option is installed."&lt;/P&gt;&lt;P&gt;~Mark&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 10:14:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175922#M2322</guid>
      <dc:creator>MarkP_</dc:creator>
      <dc:date>2012-11-19T10:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using c++ in MQX project</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175923#M2323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found a C++ related error on some RTCS and USB headers that causes you can't link your project.&lt;/P&gt;&lt;P&gt;I'm not sure if this is your problem but in any case you need to add&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_13535692372411193 jive_macro_code" jivemacro_uid="_13535692372411193" modifiedtitle="true"&gt;
&lt;P&gt;extern "C" {&lt;/P&gt;
&lt;P&gt;#include &amp;lt;header_not_linking&amp;gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;to your source if you don't want to modify MQX headers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your problem is a compiler error, Can you put the error description and the piece of code where this error theoretically is?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:24:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175923#M2323</guid>
      <dc:creator>ivanpajuelo</dc:creator>
      <dc:date>2020-10-29T09:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using c++ in MQX project</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175924#M2324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ivan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for this reminder .I totally forgot, those headers and linkage of C++ were fixed while ago , it will be fixed in next release. It could have been missed in previous releases. Sorry for troubles :smileyhappy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 09:25:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Using-c-in-MQX-project/m-p/175924#M2324</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2012-11-22T09:25:07Z</dc:date>
    </item>
  </channel>
</rss>

