Is there a good tutorial on project linking?

I really need is a good tutorial, help file, SOMETHING on project linking with Platform IO.

I find myself getting frustrated and going back to the archaic Arduino IDE which I can get libraries to link correctly. However, the Arduino IDE is outdated and inefficient for development work.

I’m trying things randomly in Platform IO and sometimes get the linking to work but not sure how. I’ve been searching this forum, and found some tips but not really a extensive overview of how Platform IO links dependencies. This is a great frustration of mine in an otherwise awesome embedded IDE. I can use library manager / ZIP file in Arudino IDE and works like a champ, but I cannot figure out how to get libraries to consistently link in Platform IO.

Specifically right now; I tried library dependencies in the /include folder and it terminal reports upon build “No such file or directory”. Try moving them to “src” and even “lib” with same result. Added “build_flags = -I include” to platform.ini file and no change in behavior.

If you’d like to recreate my issue; then build the code example linked below:

Platformio.ini:

[env:esp32thing_plus]
platform = espressif32
board = esp32thing_plus
framework = arduino

Video of what I’m trying / watch me bang my head against the wall trying to figure out project linking.Note this example project builds with zero issues in Arduino IDE but will not link in PlatformIO, which isn’t finding included libraries, no matter if in; “include”, “lib”, or “src” folder.

Screen capture of what I’ve tried

I think, the tutorial you’re looking for is Convert Arduino file to C++ manually — PlatformIO latest documentation plus the information from Library Management — PlatformIO latest documentation

It takes 4 steps to make this project work:

  1. Create a new project
  2. Install the necessary libraries (and their dependencies) to the project by adding the following lines to the platformio.ini:
lib_deps = 
  https://github.com/pschatzmann/arduino-audio-tools
  https://github.com/pschatzmann/arduino-libhelix
  1. Copy & paste the example code into your main.cpp
  2. Insert “#include <Arduino.h>” as the first line into your main.cpp (see “Convert Arduino file to C++ manually” from above)

and you’re done.