Why I have issue using arduino portable version with esp32 boards only?

Hi there,

I am trying portable arduino ide, following this tutorial :
https://docs.arduino.cc/software/ide-v1/tutorials/PortableIDE

if I compile empty sketch for arduino AVR boards, it works, but if I do that for esp32 boards, I have this issue : c:\users\pasca\downloads\arduino-1.8.19-windows\arduino-1.8.19\portable\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0\cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory

I specify that I had add esp32 boards from : https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

I tried with arduino sam board and it is ok.

The empty sketch is :

void setup() {
// put your setup code here, to run once:
}

void loop() { 
// put your main code here, to run repeatedly:
}

Thanks for help

I had the same problem over a year ago with a Wemos D1 and googled it; I know you have another board but bits/c++config.h: No such file or directory. Error compiling NodeMcu in arduino - #3 by BenB2015 solved the problem for me. So might help for you as well.

Hi, please see my latest post for a possible solution
I had similar problem, now solved.
FrancescoC

Thanks for your answers.
It still don't work.
I continue my investigations and I find that the issue come with the use of
#include <ESPAsyncWebServer.h>.
https://github.com/me-no-dev/ESPAsyncWebServer

When I compile this example sketch :

//
// A simple server implementation showing how to:
//  * serve static messages
//  * read GET and POST parameters
//  * handle missing pages / 404s
//

#include <Arduino.h>
#ifdef ESP32
#include <WiFi.h>
#include <AsyncTCP.h>
#elif defined(ESP8266)
#include <ESP8266WiFi.h>
#include <ESPAsyncTCP.h>
#endif
#include <ESPAsyncWebServer.h>

AsyncWebServer server(80);


const char* ssid = "MYSSID";           
const char* password = "MYPW";

const char* PARAM_MESSAGE = "message";

void notFound(AsyncWebServerRequest *request) {
    request->send(404, "text/plain", "Not found");
}

void setup() {

    Serial.begin(115200);
    WiFi.mode(WIFI_STA);
    WiFi.begin(ssid, password);
    if (WiFi.waitForConnectResult() != WL_CONNECTED) {
        Serial.printf("WiFi Failed!\n");
        return;
    }

    Serial.print("IP Address: ");
    Serial.println(WiFi.localIP());

    server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
        request->send(200, "text/plain", "Hello, world");
    });

    // Send a GET request to <IP>/get?message=<message>
    server.on("/get", HTTP_GET, [] (AsyncWebServerRequest *request) {
        String message;
        if (request->hasParam(PARAM_MESSAGE)) {
            message = request->getParam(PARAM_MESSAGE)->value();
        } else {
            message = "No message sent";
        }
        request->send(200, "text/plain", "Hello, GET: " + message);
    });

    // Send a POST request to <IP>/post with a form field message set to <message>
    server.on("/post", HTTP_POST, [](AsyncWebServerRequest *request){
        String message;
        if (request->hasParam(PARAM_MESSAGE, true)) {
            message = request->getParam(PARAM_MESSAGE, true)->value();
        } else {
            message = "No message sent";
        }
        request->send(200, "text/plain", "Hello, POST: " + message);
    });

    server.onNotFound(notFound);

    server.begin();
}

void loop() {
}

but if I compile the same sketch with arduino IDE downloaded from :
https://apps.microsoft.com/store/detail/arduino-ide/9NBLGGH4RSD8?hl=fr-fr&gl=FR

It works ????

Why ?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.