README (1037B)
1 2 This directory is intended for project specific (private) libraries. 3 PlatformIO will compile them to static libraries and link into executable file. 4 5 The source code of each library should be placed in a an own separate directory 6 ("lib/your_library_name/[here are source files]"). 7 8 For example, see a structure of the following two libraries `Foo` and `Bar`: 9 10 |--lib 11 | | 12 | |--Bar 13 | | |--docs 14 | | |--examples 15 | | |--src 16 | | |- Bar.c 17 | | |- Bar.h 18 | | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html 19 | | 20 | |--Foo 21 | | |- Foo.c 22 | | |- Foo.h 23 | | 24 | |- README --> THIS FILE 25 | 26 |- platformio.ini 27 |--src 28 |- main.c 29 30 and a contents of `src/main.c`: 31 ``` 32 #include <Foo.h> 33 #include <Bar.h> 34 35 int main (void) 36 { 37 ... 38 } 39 40 ``` 41 42 PlatformIO Library Dependency Finder will find automatically dependent 43 libraries scanning project source files. 44 45 More information about PlatformIO Library Dependency Finder 46 - https://docs.platformio.org/page/librarymanager/ldf.html