Having trouble compiling c++ vscode

orbitcoms
Posts: 141
Joined: Fri Aug 03, 2018 10:08 pm
Location: Sydney, Australia

Having trouble compiling c++ vscode

Postby orbitcoms » Sat Dec 04, 2021 9:40 pm

Hi,
I want to write in c++ within the vscode for esp-idf (with exp-idf extension installed).

I have changed the main.c file to main.cpp and checked the correct filename is in cmakelists.txt.

In my main file before app_main() I have added the code below.

extern "C" {
void app_main();
}

However, I get error "linkage specification is incompatible with previous "app_main". when I hover over red squiggle.

When I compile, I get error "expected unqualified-id before string constant extern "C" {

Who is online

Users browsing this forum: No registered users and 100 guests