Closed mrdsn3 closed 3 years ago
Depends on the IDE and build tool basically.
You need to add a compiler define flag. For example in platformIO you add build_flags to a target as per: https://github.com/davetcc/tcLibraryDev/blob/master/platformio.ini
While regular Arduino IDE does not support build flags directly, you would need to manually set it in the file. https://github.com/davetcc/TaskManagerIO/blob/master/src/TaskPlatformDeps.h
BTW the flag is TM_ENABLE_CAPTURED_LAMBDAS the -D at the beginning is the option for setting a flag in gcc.
thanks so is this code added the flag? is this right?
`#include
void setup() { // put your setup code here, to run once:
}
void loop() { // put your main code here, to run repeatedly:
}`
Unfortunately for Arduino IDE it has to go into TaskPlatformDeps.h in the library, otherwise it will not be picked up when compiling the library.
If you are using the pro IDE, Eclipse, or platformIO you can define the flag in the build tool.
OK thanks
How I can add this flag to my compile options DTM_ENABLE_CAPTURED_LAMBDAS