Help C++

pine
Posts: 1
Joined: Sun Jan 24, 2016 11:57 pm

Help C++

Postby pine » Mon Jan 25, 2016 12:02 am

Hi, Do the toolchain and SDK of either version support C++? I have tried to program in C++ and rename main.c to main.cpp but got error from compiler. I am not sure if C++ is not supported or I have got something wrong, or there is a different toolchain.

Thnx

HankB
Posts: 2
Joined: Fri Apr 15, 2022 11:15 am

Re: Help C++

Postby HankB » Fri Apr 15, 2022 11:36 am

The APIs are mostly C. I looked around and found some experimental C++ APIs but I don't recall if they were for the ESP8266 or ESP32. But, I can do a search now and find that the ESP8266-RTOS-SDK has 46 CPP files so there must be some support. I don't see any mention of that in the original API documents.
I've converted code I wrote for ESP32 to C++ but it still uses the C APIs and my code is C++.
If you just rename files (as I did) you will get errors that can be fixed.

Who is online

Users browsing this forum: No registered users and 3 guests