I’m using a clean install of MacOS Catalina (long story) and I’ve done a clean install of Homebrew and CLion. I installed PlatformIO using Homebrew, then I installed the PlatformIO Plugin into CLion.
I create a new project, then I always modify my Platformio.ini file to include some folders where the libraries I need are located.
However, when I create a new project, the Arduino.h library isn’t included in the project (no code completion etc.). And when I try to add the folder to Platformio.ini, it won’t pick it up. HOWEVER, if I include Arduino.h by typing out the full path to the library, it works just fine, with code completion etc.
So obviously, my lib_extra_dirs in Platformio.ini isn’t informing the project that those folders are searchable locations for library #include statements…
And YES, I did use Tools, PlatformIO, Re-Init after making the change to Platformio.ini
Any ideas why this isn’t working?
Here is my Platformio.ini just to be thorough:
[env:nanoatmega328new] platform = atmelavr board = nanoatmega328new framework = arduino lib_extra_dirs = /Users/michael/Documents/Arduino/libraries /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino /Applications/Arduino.app/Contents/Java/libraries lib_ldf_mode = chain+ lib_compat_mode = soft upload_port = /dev/cu.usbserial-14110 upload_flags = -V
So this DOES NOT WORK:
While this DOES work: