Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with WiFiManager.h #221

Open
mstrakl opened this issue Sep 13, 2024 · 0 comments
Open

Conflict with WiFiManager.h #221

mstrakl opened this issue Sep 13, 2024 · 0 comments

Comments

@mstrakl
Copy link

mstrakl commented Sep 13, 2024

None of the given examples work, due to a conflict with WiFiManager.h as it appears.

Error:
In file included from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:47:19: error: 'HTTP_ANY' conflicts with a previous declaration 47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS }; | ^~~~~~~~ In file included from src/main.cpp:33: .pio/libdeps/esp8266/ESPAsyncWebServer/src/ESPAsyncWebServer.h:83:3: note: previous declaration 'WebRequestMethod HTTP_ANY' 83 | HTTP_ANY = 0b01111111, | ^~~~~~~~ In file included from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:47:29: error: 'HTTP_GET' conflicts with a previous declaration 47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS }; | ^~~~~~~~ In file included from src/main.cpp:33: .pio/libdeps/esp8266/ESPAsyncWebServer/src/ESPAsyncWebServer.h:76:3: note: previous declaration 'WebRequestMethod HTTP_GET' 76 | HTTP_GET = 0b00000001, | ^~~~~~~~ In file included from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:47:39: error: 'HTTP_HEAD' conflicts with a previous declaration 47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS }; | ^~~~~~~~~ In file included from src/main.cpp:33: .pio/libdeps/esp8266/ESPAsyncWebServer/src/ESPAsyncWebServer.h:81:3: note: previous declaration 'WebRequestMethod HTTP_HEAD' 81 | HTTP_HEAD = 0b00100000, | ^~~~~~~~~ In file included from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:47:50: error: 'HTTP_POST' conflicts with a previous declaration 47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS }; | ^~~~~~~~~ In file included from src/main.cpp:33: .pio/libdeps/esp8266/ESPAsyncWebServer/src/ESPAsyncWebServer.h:77:3: note: previous declaration 'WebRequestMethod HTTP_POST' 77 | HTTP_POST = 0b00000010, | ^~~~~~~~~ In file included from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:47:61: error: 'HTTP_PUT' conflicts with a previous declaration 47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS }; | ^~~~~~~~ In file included from src/main.cpp:33: .pio/libdeps/esp8266/ESPAsyncWebServer/src/ESPAsyncWebServer.h:79:3: note: previous declaration 'WebRequestMethod HTTP_PUT' 79 | HTTP_PUT = 0b00001000, | ^~~~~~~~ In file included from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:47:71: error: 'HTTP_PATCH' conflicts with a previous declaration 47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS }; | ^~~~~~~~~~ In file included from src/main.cpp:33: .pio/libdeps/esp8266/ESPAsyncWebServer/src/ESPAsyncWebServer.h:80:3: note: previous declaration 'WebRequestMethod HTTP_PATCH' 80 | HTTP_PATCH = 0b00010000, | ^~~~~~~~~~ In file included from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:47:83: error: 'HTTP_DELETE' conflicts with a previous declaration 47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS }; | ^~~~~~~~~~~ In file included from src/main.cpp:33: .pio/libdeps/esp8266/ESPAsyncWebServer/src/ESPAsyncWebServer.h:78:3: note: previous declaration 'WebRequestMethod HTTP_DELETE' 78 | HTTP_DELETE = 0b00000100, | ^~~~~~~~~~~ In file included from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:47:96: error: 'HTTP_OPTIONS' conflicts with a previous declaration 47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS }; | ^~~~~~~~~~~~ In file included from src/main.cpp:33: .pio/libdeps/esp8266/ESPAsyncWebServer/src/ESPAsyncWebServer.h:82:3: note: previous declaration 'WebRequestMethod HTTP_OPTIONS' 82 | HTTP_OPTIONS = 0b01000000, | ^~~~~~~~~~~~ In file included from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h: In member function 'size_t esp8266webserver::ESP8266WebServerTemplate<ServerType>::streamFile(T&, const String&, HTTPMethod)': /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:234:23: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 234 | if (requestMethod == HTTP_GET) { | ~~~~~~~~~~~~~~^~~~~~~~~~~ /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h: In member function 'size_t esp8266webserver::ESP8266WebServerTemplate<ServerType>::stream(T&, const String&, HTTPMethod, ssize_t)': /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:246:23: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 246 | if (requestMethod == HTTP_GET) | ~~~~~~~~~~~~~~^~~~~~~~~~~ In file included from /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h:30, from /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:349, from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h: In member function 'bool esp8266webserver::FunctionRequestHandler<ServerType>::canHandle(HTTPMethod, const String&)': /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h:49:21: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 49 | if (_method != HTTP_ANY && _method != requestMethod) | ~~~~~~~~^~~~~~~~~~~ /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h: In member function 'bool esp8266webserver::StaticRequestHandler<ServerType>::validMethod(HTTPMethod)': /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h:99:31: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 99 | return (requestMethod == HTTP_GET) || (requestMethod == HTTP_HEAD); | ~~~~~~~~~~~~~~^~~~~~~~~~~ /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h:99:62: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 99 | return (requestMethod == HTTP_GET) || (requestMethod == HTTP_HEAD); | ~~~~~~~~~~~~~~^~~~~~~~~~~~ Compiling .pio/build/esp8266/lib461/ESP8266WiFi/WiFiClient.cpp.o In file included from /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:349, from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h: In member function 'bool esp8266webserver::ESP8266WebServerTemplate<ServerType>::authenticateDigest(const String&, const String&)': /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h:171:25: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 171 | if(_currentMethod == HTTP_GET){ | ~~~~~~~~~~~~~~~^~~~~~~~~~~ /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h:173:31: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 173 | }else if(_currentMethod == HTTP_POST){ | ~~~~~~~~~~~~~~~^~~~~~~~~~~~ /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h:175:31: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 175 | }else if(_currentMethod == HTTP_PUT){ | ~~~~~~~~~~~~~~~^~~~~~~~~~~ /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h:177:31: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 177 | }else if(_currentMethod == HTTP_DELETE){ | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ In file included from /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:349, from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h: In member function 'void esp8266webserver::ESP8266WebServerTemplate<ServerType>::sendContent(Stream*, ssize_t)': /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h:531:22: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 531 | if (_currentMethod == HTTP_HEAD) | ~~~~~~~~~~~~~~~^~~~~~~~~~~~ In file included from /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:350, from .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:57, from src/main.cpp:34: /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/Parsing-impl.h: In member function 'esp8266webserver::ESP8266WebServerTemplate<ServerType>::ClientFuture esp8266webserver::ESP8266WebServerTemplate<ServerType>::_parseRequest(esp8266webserver::ESP8266WebServerTemplate<ServerType>::ClientType&)': /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/Parsing-impl.h:116:14: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 116 | if (method == HTTP_POST || method == HTTP_PUT || method == HTTP_PATCH || method == HTTP_DELETE){ | ~~~~~~~^~~~~~~~~~~~ /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/Parsing-impl.h:116:37: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 116 | if (method == HTTP_POST || method == HTTP_PUT || method == HTTP_PATCH || method == HTTP_DELETE){ | ~~~~~~~^~~~~~~~~~~ /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/Parsing-impl.h:116:59: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 116 | if (method == HTTP_POST || method == HTTP_PUT || method == HTTP_PATCH || method == HTTP_DELETE){ | ~~~~~~~^~~~~~~~~~~~~ /home/mstrakl/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/Parsing-impl.h:116:83: warning: comparison between 'enum HTTPMethod' and 'enum WebRequestMethod' [-Wenum-compare] 116 | if (method == HTTP_POST || method == HTTP_PUT || method == HTTP_PATCH || method == HTTP_DELETE){ | ~~~~~~~^~~~~~~~~~~~~~ Compiling .pio/build/esp8266/lib461/ESP8266WiFi/WiFiClientSecureBearSSL.cpp.o src/main.cpp: In function 'void setup()': src/main.cpp:88:20: error: cannot convert 'AsyncWebServer*' to 'ESP8266WebServer*' {aka 'esp8266webserver::ESP8266WebServerTemplate<WiFiServer>*'} 88 | ElegantOTA.begin(&server); // Start ElegantOTA | ^~~~~~~ | | | AsyncWebServer* In file included from src/main.cpp:34: .pio/libdeps/esp8266/ElegantOTA/src/ElegantOTA.h:107:38: note: initializing argument 1 of 'void ElegantOTAClass::begin(ESP8266WebServer*, const char*, const char*)' 107 | void begin(ELEGANTOTA_WEBSERVER *server, const char * username = "", const char * password = "");

platformio.ini:
[env:esp8266] framework = arduino platform = espressif8266 board = nodemcuv2 lib_deps = ayushsharma82/ElegantOTA@^3.1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant