ESP32 ArduinoSTL library conflict

I’ve written some code to play with led’s. Here’s my platformio.ini:

[env:esp32]
platform = espressif32
framework = arduino
board = esp32dev
lib_deps =
mike-matera/ArduinoSTL@^1.3.3
adafruit/Adafruit NeoPixel@^1.12.0

[env:uno]
platform = atmelavr
framework = arduino
board = uno
lib_deps =
mike-matera/ArduinoSTL@^1.3.3
adafruit/Adafruit NeoPixel@^1.12.0

The uno environment compiles, but the esp32 environment doesn’t due to hundreds of errors compiling the ArduinoSTL library. This is a typical example:

.pio/libdeps/esp32/ArduinoSTL/src/cstdlib:27:10: error: ‘::abort’ has not been declared

It seems that platformio is picking up the cstdlib from the ArduinoSTL includes folder, rather than taking the correct one from the board.

Now, I know this can work, because I loaded the code into the ArduinoIDE, and it compiles fine for the esp32. The code still doesn’t work, but that’s more down to my lack of experience with the esp32.

I found this related post while researching the problem, but there’s no solution.

Any advice would be great. I wanna use vscode and platformio, rather than the retarded editor the ArduinoIDE gives you.

Okay, then delete the ArduinoSTL library from the lib_deps of the ESP32 environment? o_o

Oh.

I see.

Why does that work? Never mind, I can work that out for myself.

Thank you so much.

1 Like