It looks like some of the ESP-IDF headers or sample sources might not be fully compatible with C++. As this code comes directly from Espressif and is not maintained by us, unfortunately we cannot guarantee that it will be fully compatible with C++, however we can suggest a way to troubleshoot it.
Please try locating the first error in the build log (View->Output). It is likely responsible for many of the other errors and fixing it will reduce the amount of the remaining errors. Depending on the exact error, you might be able to fix it by wrapping some headers with extern “C” or using #define directives to rename some fields in case their names collide with C++ keywords.
Feel free to post the build log here and we might be able to share a few more hints on fixing this.