Having difficulties using C++ STL on ESP32

Sysprogs forums Forums VisualGDB Having difficulties using C++ STL on ESP32

Tagged: , ,

This topic contains 2 replies, has 2 voices, and was last updated by  nuhash 1 year, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24886

    nuhash
    Participant

    I am trying to use the C++ utils here: https://github.com/nkolban/esp32-snippets/tree/master/cpp_utils

    I’ve cloned the repo and added the component by adding the cpp_utils path to the SRCDIRS in the makefile.

    I am using the hello_world project so I haven’t added anything extra yet.

    If I include BLEDevice.h it asks me to add the following directories to the main project component file:

    COMPONENT_PRIV_INCLUDEDIRS += ../../../../../../../SysGCC/esp32/opt/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0 ../../../../../../../SysGCC/esp32/opt/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/xtensa-esp32-elf

    However, I get compile errors from STL header files in these directories:

    There are a lot more errors but they are related to referencing the STL

    #24889

    support
    Keymaster

    Hi,

    Please double-check that you are not trying to include STL headers from .h files that are included from plain C files.

    If it doesn’t help, please follow the steps on this page to narrow it down to a specific step triggering the problem and we will try to help you. That said, it might be a limitation of the ESP32 toolchain, so it could be worthwhile to check with Espressif whether it’s a known problem.

    #24896

    nuhash
    Participant

    I completely forgot about C-C++ interactions. I’ve fixed it now. Thank you.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.