Suddenly extern "C" { .. } in esp_task_wdt.h is throwing error message

Suddenly getting this error with code that compiled just fine last evening…

.platformio/packages/framework-arduinoespressif32/tools/esp32-arduino-libs/esp32s3/include/esp_system/include/esp_task_wdt.h:15:8: error: expected unqualified-id before string constant

I have not touched esp_task_wdt.h. I simply include it in modules where I need to use the esp_task_wdt_reset() command.

the source code of esp_task_wdt.h looks perfectly normal to me…

#ifdef __cplusplus
extern "C" {
#endif

...


#ifdef __cplusplus
}
#endif

Any suggestions?

I have already tried a full clean and that did not help.

THANKS!

I think I found the issue…

one of my #include <esp_task_wdt.h> was within a function instead of simply at the top of the .cpp file.

working now.

Not sure I understand why this breaks that, but will not do that again…

1 Like