I am trying to include my own code in the espruino firmware. My code is partly written in c++. But if I try to build it, it failed:
Espruino/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/bits/c++0x_warning.h:32:2: error: error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
I tried several ways to set the -std=c++ flag in the Makefile, but I couldn't resolve it.
(If I mixed something up, I apologize, C is not my native language 😅)
After hours of try and error:
The "-std=c++11" needs to be added to "LDFLAGS" line in the Makefile:
LDFLAGS?=-Winline -g -std=c++11
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem