Although I added the path for a custom library in the platform.ini file under lib_extra_dirs I still get the error message src/main.cpp:4:10: fatal error: Actuator.h: No such file or directory.
You don’t specify the path where one particular library is stored, but the folder which contains all the library folders. Just reduce the path to /Users/omaralamoudi/Dropbox/Arduino/libraries/ and retry.
Note also that global libraries are considered dangerous because you include everything in that folder, which might give false matches to the libraries you actually want. Explicit dependency management using lib_deps (docs) and the PlatformIO Registry registery the is to be preferred here.
Works for me. Maybe retry with file:///Users/omaralamoudi/Dropbox/Arduino/libraries/Actuator (the double-/ are from the file protcol and then / means root of FS)
I have a C:\Users\Maxi\Desktop\test_lib with the contents test.h and test.cpp
Processing Arduino Nano 16MHz (platform: atmelavr; board: nanoatmega328; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/nanoatmega328.html
PLATFORM: Atmel AVR (2.2.0) > Arduino Nano ATmega328
HARDWARE: ATMEGA328P 16MHz, 2KB RAM, 30KB Flash
DEBUG: Current (simavr) On-board (simavr)
PACKAGES:
- framework-arduino-avr 5.0.0
- toolchain-atmelavr 1.50400.190710 (5.4.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Library Manager: Installing file://C:\Users\Maxi\Desktop\test_lib
Library Manager: test_lib @ 0.0.0+20201014210041 has been installed!
Found 10 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <test_lib> 0.0.0+20201014210041
[..]
RAM: [ ] 0.4% (used 9 bytes from 2048 bytes)
Flash: [ ] 1.4% (used 444 bytes from 30720 bytes)
============================= [SUCCESS] Took 2.75 seconds =============================
However that also has the negative side-effective that the library is installed locally in the project under .pio\libdeps\<environment> now and it’s again non-centralized. (Which is a desirable end-result in project management, but only in the end).
So you should just stick with lib_extra_dirs for now.