Hello,
I am new to platformIO and tried to create a clean project where I can use the esp-idf framework with c++ libraries. In particular I am trying to use the TinyGSM library but I can’t compile my project. I installed the library to my project from the PIO libraries page and renamed my main.c to main.cpp as I want to write my code in c++ but have not made any changes in the project after that.
Is it not possible to use c++ with esp-idf or do I need to do additional setup before it works?
This is what my .ini file looks like,
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = espidf
lib_deps =
vshymanskyy/TinyGSM@^0.11.7
marcoschwartz/LiquidCrystal_I2C@^1.1.4
and this is what my main.cpp looks like
#include <TinyGsmClient.h>
extern "C" {void app_main(void){}}
void app_main(void) {}
and i get this error when running the compiler.
I have tried to restart VS code, re-installed the library, added the library in /lib/ instead but I cant seem to get it working.
Have I done my setup incorrectly?