I created a Library with the following folder structure:
MyLibrary
|--include
| |--MyLibrary.h
|-src
| |--MyLibrary.cpp
|--examples
| |--example1.cpp
| |--example2.cpp
|--libary.json
|--platformio.ini
In the library.json
, I have it configured like this:
{
"export": {
"include": [
"/src/*.cpp",
"/include/*.h"
]
}
}
The ini file looks like this:
[env]
framework = arduino
[platformio]
src_dir = examples
lib_dir = ./
[env:example1]
board = uno
platform = atmelavr
src_filter = -<*> +<example1.cpp>
[env:example2]
board = uno
platform = atmelavr
src_filter = -<*> +<example2.cpp>
Somehow the MyLibrary.cpp
file ist not found by the compiler (or at least not used). How do I need to configure my project to be able to compile the examples just like I would with every other PIO project?