ESP-IDF with C++

Hello everyone, sorry for this dummie question but …
If I create a new idf project in platformio, It includes by default a main.c file. How can I replace it with a main.cpp file? I assume I need to modify the CMake file, correct?

image

Thanks for help. :slight_smile:

Given the espidf-hello-world example’s CMake of

with

grafik

you indeed just have to rename the file to .cpp then update the filename in the quoted cmake.

1 Like