<?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: Including &amp;lt;iostream&amp;gt; with LwIP stack causes compiler errors (C++ project) in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Including-lt-iostream-gt-with-LwIP-stack-causes-compiler-errors/m-p/1036678#M7423</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ronnie,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check the below community thread where this question has already been answered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/520387"&gt;I did not compile "Hello World" .cpp code in MCUXpresso&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Felipe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Mar 2020 21:57:08 GMT</pubDate>
    <dc:creator>FelipeGarcia</dc:creator>
    <dc:date>2020-03-06T21:57:08Z</dc:date>
    <item>
      <title>Including &lt;iostream&gt; with LwIP stack causes compiler errors (C++ project)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Including-lt-iostream-gt-with-LwIP-stack-causes-compiler-errors/m-p/1036677#M7422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I create a C++ project in MCUXpresso:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;File-&amp;gt;New-&amp;gt;New C/C++ Project-&amp;gt;evkmimxrt1020&lt;/LI&gt;&lt;LI&gt;Project Type: C++ Project&lt;/LI&gt;&lt;LI&gt;Project Options: UART&lt;/LI&gt;&lt;LI&gt;Leave everything as default apart from:&lt;/LI&gt;&lt;LI&gt;Middleware:&lt;UL&gt;&lt;LI&gt;Network-&amp;gt;lwIP TCPIP Networking Stack-&amp;gt;lwIP&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Drivers:&lt;UL&gt;&lt;LI&gt;enet&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add the following line to the main .cpp file (e.g. MIMXRT1021xxxxx_Project.cpp), after all the default includes:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;#include &amp;lt;iostream&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Build Project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the following compiler errors &amp;lt;snippet&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;Invoking: MCU C Compiler&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;arm-none-eabi-gcc -D__NEWLIB__ -DCPU_MIMXRT1021DAG5A -DCPU_MIMXRT1021DAG5A_cm7 -DFSL_RTOS_BM -DSDK_OS_BAREMETAL -DXIP_EXTERNAL_FLASH=1 -DXIP_BOOT_HEADER_ENABLE=1 -DSERIAL_PORT_TYPE_UART=1 -DSDK_DEBUGCONSOLE=1 -D__MCUXPRESSO -D__USE_CMSIS -DDEBUG ....lots of -I..... -O0 -fno-common -g3 -Wall -c -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -fmerge-constants -fmacro-prefix-map="../lwip/src/netif/ppp/"=. -mcpu=cortex-m7 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -D__NEWLIB__ -fstack-usage -MMD -MP -MF"lwip/src/netif/ppp/auth.d" -MT"lwip/src/netif/ppp/auth.o" -MT"lwip/src/netif/ppp/auth.d" -o "lwip/src/netif/ppp/auth.o" "../lwip/src/netif/ppp/auth.c"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;In file included from c:\nxp\mcuxpressoide_11.1.0_3209\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.201909161352\tools\arm-none-eabi\include\c++\8.3.1\system_error:39,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; from c:\nxp\mcuxpressoide_11.1.0_3209\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.201909161352\tools\arm-none-eabi\include\c++\8.3.1\bits\ios_base.h:46,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; from c:\nxp\mcuxpressoide_11.1.0_3209\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.201909161352\tools\arm-none-eabi\include\c++\8.3.1\ios:42,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; from c:\nxp\mcuxpressoide_11.1.0_3209\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.201909161352\tools\arm-none-eabi\include\c++\8.3.1\ostream:38,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; from c:\nxp\mcuxpressoide_11.1.0_3209\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.201909161352\tools\arm-none-eabi\include\c++\8.3.1\iostream:39,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; from ../source/MIMXRT1021xxxxx_Project.cpp:43:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;c:\nxp\mcuxpressoide_11.1.0_3209\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.201909161352\tools\arm-none-eabi\include\c++\8.3.1\arm-none-eabi\thumb\v7e-m+fp\hard\bits\error_constants.h:122:27: error: 'ENOTSUP' was not declared in this scope&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; not_supported = ENOTSUP,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; ^~~~~~~&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;c:\nxp\mcuxpressoide_11.1.0_3209\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.201909161352\tools\arm-none-eabi\include\c++\8.3.1\arm-none-eabi\thumb\v7e-m+fp\hard\bits\error_constants.h:122:27: note: suggested alternative: 'ENOCSI'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; not_supported = ENOTSUP,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; ^~~~~~~&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; ENOCSI&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;c:\nxp\mcuxpressoide_11.1.0_3209\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.201909161352\tools\arm-none-eabi\include\c++\8.3.1\arm-none-eabi\thumb\v7e-m+fp\hard\bits\error_constants.h:126:31: error: 'ECANCELED' was not declared in this scope&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; operation_canceled = ECANCELED,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; ^~~~~~~~~&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;c:\nxp\mcuxpressoide_11.1.0_3209\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.201909161352\tools\arm-none-eabi\include\c++\8.3.1\arm-none-eabi\thumb\v7e-m+fp\hard\bits\error_constants.h:135:24: error: 'EOWNERDEAD' was not declared in this scope&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; owner_dead = EOWNERDEAD,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; ^~~~~~~~~~&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;Finished building: ../startup/startup_mimxrt1021.cpp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;c:\nxp\mcuxpressoide_11.1.0_3209\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.201909161352\tools\arm-none-eabi\include\c++\8.3.1\arm-none-eabi\thumb\v7e-m+fp\hard\bits\error_constants.h:151:34: error: 'ENOTRECOVERABLE' was not declared in this scope&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; state_not_recoverable = ENOTRECOVERABLE,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; ^~~~~~~~~~~~~~~&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Take out the extra include and it compiles ok.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a quick look at the header files and tried including &amp;lt;sys/errno.h&amp;gt; before including &amp;lt;iostream&amp;gt;. It compiles. (And I can output stuff with std::cout as long as I set SDK_DEBUGCONSOLE_UART=1.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main function is the default apart from the extra include(s).&lt;/P&gt;&lt;P&gt;The preprocessor symbols are the same as a raw C++/UART project without the lwip stack.&lt;/P&gt;&lt;P&gt;Without doing lots of digging I cannot see how including the lwip stack (and not using it) can have this effect. Perhaps it is setting a preprocessor symbol or including a header file somehow. It is not obvious.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RT1020-EVK&lt;/P&gt;&lt;P&gt;MCUXpresso IDE v11.1.0 [Build 3209] [2019-12-12]&lt;/P&gt;&lt;P&gt;SDK version 2.7.0&lt;/P&gt;&lt;P&gt;Windows 10&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2020 15:43:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Including-lt-iostream-gt-with-LwIP-stack-causes-compiler-errors/m-p/1036677#M7422</guid>
      <dc:creator>rshipman</dc:creator>
      <dc:date>2020-03-02T15:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Including &lt;iostream&gt; with LwIP stack causes compiler errors (C++ project)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Including-lt-iostream-gt-with-LwIP-stack-causes-compiler-errors/m-p/1036678#M7423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ronnie,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check the below community thread where this question has already been answered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/520387"&gt;I did not compile "Hello World" .cpp code in MCUXpresso&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Felipe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2020 21:57:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Including-lt-iostream-gt-with-LwIP-stack-causes-compiler-errors/m-p/1036678#M7423</guid>
      <dc:creator>FelipeGarcia</dc:creator>
      <dc:date>2020-03-06T21:57:08Z</dc:date>
    </item>
  </channel>
</rss>

