me-no-dev / ESPAsyncWebServer

Async Web Server for ESP8266 and ESP32
3.78k stars 1.23k forks source link

does not compile with ESP32C3 #1420

Open philippedc opened 4 months ago

philippedc commented 4 months ago

Hi, IDE version 1.8.16 with Expressif Sytems (ESP32) version 2.0.14 no problem with ESP32 dev module, but with ESP32C3 I get this error message during compilation:

C:\Users\yakac\Documents\Arduino\libraries\ESPAsyncWebServer-master\src\AsyncWebSocket.cpp: In member function 'IPAddress AsyncWebSocketClient::remoteIP()': C:\Users\yakac\Documents\Arduino\libraries\ESPAsyncWebServer-master\src\AsyncWebSocket.cpp:832:28: error: call of overloaded 'IPAddress(unsigned int)' is ambiguous return IPAddress(0U); ^ In file included from C:\Users\yakac\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32/Arduino.h:180, from C:\Users\yakac\Documents\Arduino\libraries\ESPAsyncWebServer-master\src\AsyncWebSocket.cpp:21: C:\Users\yakac\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32/IPAddress.h:51:5: note: candidate: 'IPAddress::IPAddress(const uint8_t)' IPAddress(const uint8_t address); ^~~~~ C:\Users\yakac\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32/IPAddress.h:50:5: note: candidate: 'IPAddress::IPAddress(uint32_t)' IPAddress(uint32_t address); ^~~~~ C:\Users\yakac\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32/IPAddress.h:29:7: note: candidate: 'constexpr IPAddress::IPAddress(const IPAddress&)' class IPAddress: public Printable ^~~~~ Plusieurs bibliothèque trouvées pour "SD.h" Utilisé : C:\Users\yakac\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\SD Non utilisé : C:\Program Files (x86)\Arduino\libraries\SD Plusieurs bibliothèque trouvées pour "WiFi.h" Utilisé : C:\Users\yakac\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\WiFi Non utilisé : C:\Program Files (x86)\Arduino\libraries\WiFi exit status 1 Erreur de compilation pour la carte ESP32C3 Dev Module

Mark-Wills commented 2 months ago

Could try changing the return statement to:

return 0UL;

It should then pick the override with the uint32 address type.