Yes ESP-IDF works with classes.
Your mistake is just that you have the file main.c
in which you include a header file that has the class
keyword. The C language has no classes, C++ has. This is not a fault of the ESP-IDF framework.
Please see Standard C++. It is well possible to interface C and C++ code with the right technique (extern "C"
, #ifdef __cplusplus
and friends). There’s also an ESP-IDF + C++ example at Using c++ with ESP-IDF for ESP32 development.