Adding private library

Hi everyone,

I am trying to include a private library that I’ve created but I get errors. I added the library into the lib folder following this structure

Also, I tried to include library’s path but nothing changed

Do I miss something?

What is the dependency graph at the start of the compilation output?

Does addnig lib_deps = Flobit or Rebuilding Intellisense work?


Rebuilding Intellisense didn’t work. Also, I’ve tried to move the library into libdeps and adding lib_deps = Flobit to pltoformio.ini but it didn’t work…

What is the dependency graph at the start of the compilation output (I do not know what is this :))

This is the error log

Here I include the path

The library still has to be in the lib/ folder of the project.

Just start the Build task the first things you’ll see is…

Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Atmel SAM 4.1.0 > Moteino M0
HARDWARE: SAMD21G18A 48MHz, 32KB RAM, 256KB Flash
DEBUG: Current (atmel-ice) External (atmel-ice, blackmagic, cmsis-dap, jlink)
 - framework-arduino-samd-moteino 1.3.0 
 - framework-cmsis 1.40500.0 (4.5.0) 
 - framework-cmsis-atmel 1.2.0 
 - toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 11 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <RTCZero> 1.6.0
Building in release mode
Compiling .pio\build\moteino_zero\src\main.cpp.o

there’s the Dependency Graph right there

Thank you for your help. I will check tomorrow the Dependency Graph.

I am a bit confused… you mean that the library must be at both directories at the same time (lib & lib_depth)?

No… lib_deps is a parameter in your platformio.ini which tells PlatformIO that a library is needed. It should auto-detect the library it self, but if it doesn’t, you can force it.

When you actually compile your code, does it find the library then, or is it just the IntelliSense (Problems tab, red squiggle underlines) that isn’t finding it? (i.e. is it a intellisense configuration/false positive or an real compile issue). If you have actual compile issue, see if changing your library structure so the header/source files are in a src subfolder (i.e. follow the Arduino library layout spec)…i.e. Flobit.v2/lib/Flobit/src/Flobit_V2.h … makes any difference.

Ok, what it seems from the dependency graph is that platformio finds the library, but the errors still exist. This is somehow related to the IntelliSense? It doesn’t look like I have compilation error and I have also tried to include the header/source file into an src subfolder but the problem still persists.



Also sometimes and while I have open both files header and source the below pop up messages appear and the files instantly close


Hm… all I can think of in relation to the ‘unable to read’ errors and closing tabs is perhaps VSCode doesn’t like how Dropbox syncs files? Other than that, since it’s compiling fine, but showing up in the ‘Problems’ tab, it is indeed suggestive of it being just an IntelliSense issue.