CopyThreads icon indicating copy to clipboard operation
CopyThreads copied to clipboard

'Scheduler' is already declared in this scope when building for board = adafruit_feather_nrf52840

Open aovestdipaperino opened this issue 3 years ago • 2 comments

When I build for adafruit_feather_nrf52840 there is a conflict with the declaration SchedulerRTOS Scheduler in rtos.h. I tried to wrap CopyThreads classes in their own namespace without being able to override the default. If this issue is interesting, I can help with a solution.

aovestdipaperino avatar May 19 '22 14:05 aovestdipaperino

Thanks for trying CopyThread on nrf52840! I would not use two different Schedulers at the same time (SchedulerRTOS and CthClass). As far as i know, Arduino expect at most one Singelton instance of Scheduler and the instantiation is outside of CopyThread. You might want to try only the C part of CopyThread without the Arduino adapter in Cth.h.

jensh avatar May 19 '22 15:05 jensh

Thanks for your answer. For whatever reason when compiling for ESP32 the error doesn't show up, probably due to a different #include order. I will play with the C version, thanks!

aovestdipaperino avatar May 19 '22 19:05 aovestdipaperino