Custom firmware include c++ (2011)

Posted on
  • 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 😅)

    Jonas

  • 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
    
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Custom firmware include c++ (2011)

Posted by Avatar for Jonaswinz @Jonaswinz

Actions