Error: 'const char STATUS []' redeclared as different kind of symbol

Been using PIO for about a year to make numerous projects - all great. Now, since recently upgrading a few libraries via the Arduino 2 IDE, I get this error for all my programs, on all types of ESP32 board:

C:/Users/johne/Documents/Arduino/libraries/WiFiEspAT/src/utility/EspAtDrv.cpp:38:19: error: ‘const char STATUS []’ redeclared as different kind of symbol

I realise now I should only update one library at a time. Of course, I am assuming it’s a library problem, but I seem unable to determine how to fix the problem.

Please can someone educate me as to how to track down the offending item and how to fix it? Apologies if I’m missing something obvious!

This looks like you are using PlatformIO in a wrong way.
You are using a global library folder, which is not good and can always lead to problems.

Please show the content of your platformio.ini for this project.

Edit: The example project “ChatServer.ino” compiles fine for an Arduino UNO.

My platform.ini for a failing program is this:

; PlatformIO Project Configuration File Just for testing
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
; Please visit documentation for the other options and examples
; Redirecting...

#board = esp32doit-devkit-v1
board = ttgo-t1
platform = espressif32
framework = arduino
#default_envs = esp32
#upload_protocol = espota
#upload_port =
#build_type = debug
monitor_speed = 115200
monitor_filters = esp32_exception_decoder, default, time
#lib_deps = ESP Async WebServer
lib_extra_dirs = ~/Documents/Arduino/libraries
#lib_deps = lvgl/lvgl@^9.0.0
#GitHub - me-no-dev/ESPAsyncWebServer: Async Web Server for ESP8266 and ESP32
#GitHub - me-no-dev/AsyncTCP: Async TCP Library for ESP32
lib_compat_mode = strict
lib_ignore = WiFiNINA
board_build.filesystem = littlefs

Thats the root cause of your problem.
Don’t use a global library folder!
Only put the libraries you need into lib_deps.

Thank you sivar2311 !!

I guess this is the way to gain explicit control, and that has to be a good thing.

Thanks again :grinning: