7 years, 6 months ago.

Error when compiling using mbed cli

/media/uploads/fwndz/screenshot_from_2016-09-29_14-53-58.png

Hi all mbeder, I need some help, I am using mbed cli for compiling my program. When I run simple blink led code it worked fine. But when i try to run mqtt example from here (https://developer.mbed.org/teams/ESP8266/code/ESP8266_MQTT_HelloWorld/) error occured.

As referring to the image, it shows that "This file requires compiler and library support for the ISO C++ 2011 standard", Can I know what that mean? Can some one help me to solve the problem?

2 Answers

7 years, 6 months ago.

Even when compiling with gnu++11 option (you can see the actual command using mbed compile -v then edit the compile options) it fails to compile with GCC.

That program only seems to compile using ARMCC (the ARM compiler that comes with KEIL tools), not with GCC... If I build locally with ARM toolchain in mbed CLI it compiles fine, just not with GCC_ARM toolchain. I'd raise a ticket with the program authors.

On the online compiler it always compiles with ARMCC so they are probably not even aware of it.

7 years, 6 months ago.

this sample compiles with gcc when you add these compiler options: -std=c++11 -fpermissive Then it complains about some new stuff in c++11 in TCPSocketConnection.cpp. This comes from the debug macro which you can turn off:

//Debug is disabled by default
#if 0

But I haven't tried if the binary runs correctly.