Closed tomstix closed 1 year ago
Okay, I have to #include <arduino_freertos.h>
before including <mutex>
. Makes sense but is there a way to automatically include this without having to modify the library?
Yes, you have to include arduino_freertos.h first. No, there is no way to include it automatically.
Problem:
When creating source files inside the PlatformIO "lib" folder, std::mutex and also std::condition_variable can not be used. Building a project with the follówing code inside lib/testlib/testlib.cpp
fails with
lib\testlib\testlib.cpp:8:15: error: 'mutex' in namespace 'std' does not name a type
I'm guessing there is some kind of include path missing? The platformio.ini file looks like this:
PlatformIO's verbose Output shows the following:
I need std::thread, std::mutex, etc. support for including an external library so any help is appreciated!