I’m using PlatformIO with CLion, and my project has an external dependency in lib_deps (ESPAsyncWebServer). However when I include this header in my main.cpp and I try to use it, CLion acts as if the header doesn’t even exist, and gives me all sorts of red squiggly lines. PlatofmrIO can still compile and upload the project without any problems, so I think this is just a CLion issue.
One workaround is to include the file like this:
#include "../.pio/libdeps/esp32thing/ESP Async WebServer/src/ESPAsyncWebServer.h"
instead of this:
This way I can at least get IntelliSense for the library functions, and I can still upload the project on my dev board, but this is kind of a nasty workaround, and I’m hoping that there is something in CLion’s settings that I can tweak to make it recognize header files in
Built-in headers like
WiFi.h are correctly recognized by IntellySense, it’s only having problems with the
ESPAsyncWebServer library added with lib_deps.
Here’s my platformio.ini file:
[env:esp32thing] platform = espressif32 board = esp32thing framework = arduino upload_port = COM8 monitor_port = COM8 monitor_speed = 115200 board_build.partitions = huge_app.csv lib_deps = WiFi FS https://github.com/me-no-dev/ESPAsyncWebServer.git
Some additional info:
- MCU: ESP32 (Adafruit HUZZAH32, Adafruit ESP32 Thing in PlatformIO)
- Framework: Arduino
- CLion: 2021.2.2
- Toolchain: MinGW
- CMake profile: esp32thing