Closed BlackEdder closed 4 years ago
Would it also help if I moved this declaration into TaskScheduler.h file, which must only be included once?
declare it using extern in a .h file and implement it in only a single .cpp file.
Something like this...
some.h
file:
extern unsigned long micros(void);
extern unsigned long millis(void);
some.cpp
file:
#include "some.h"
unsigned long micros(void) { .... }
unsigned long millis(void) { .... }
This allows the .h file to be included as much as you like. The same for (global) variables. Declare as extern and construct in only a single .cpp file.
I can't have any .cpp files in the library due to the way Arduino IDE handles external #define
statements...
Could you please check if the version I just pushed into "testing" branch solves the issue? Thx
I had the same issue but the testing branch version solved the compilation errors for me.
Pushed into master as 3.1.2
Thank you this has now been solved.
I get the follow error with later versions of TaskScheduler/esp:
I assume this would be solved by wrapping them as follows in the TaskSchedulerDeclarations file (but have not tested this).