Espressif ESP32 Official Forum
Dual boot - Step by Step The tutorial originated from the issue Dual Boot Win 10 EFI and has evolved with detailed instructions to prepare your Windows installation to co-exist with Manjaro. Target systems Firmware Checklist Windows preparation Manjaro installation Revisions Target systems UEFI Computers with preinstalled Windows (Windows 10) is computers using UEFI firmware. This guide is a generic guide targeted at UEFI installations. However some of the guide does apply even if you a...
The correct solution
Since #include is a simple text replacement by the preprocessor, we can put the extern "C" declaration in our C++ code, where it belongs:
//main.cpp
extern "C" {
#include "foo.h"
}
int main() {
foo(22);
}
This way, everything inside the header, including the indirectly included declarations in other C headers, appear inside the extern "C" declaration.