khoih-prog / WiFiWebServer

This is simple yet complete WebServer library for AVR, Portenta_H7, Teensy, SAM DUE, SAMD, STM32, RP2040-based, etc. boards running WiFi modules/shields (WiFiNINA, CYW43439, U-Blox W101, W102, etc.). The functions are similar and compatible to ESP8266/ESP32 WebServer libraries to make life much easier to port sketches from ESP8266/ESP32. Now using WiFiMulti_Generic library
MIT License
105 stars 21 forks source link

WifiWebServer and EthernetWebServer Incompatible #4

Closed samtd closed 3 years ago

samtd commented 3 years ago

Hey. You have great libraries. Congratulations. I'm trying use both libraries WifiWebServer and EthernetWebServer in my project and have redefinition problems. With only one library i don't have any problem.

Examples: error: multiple definition of 'enum mime::type' enum type error: redefinition of 'struct mime::Entry' struct Entry error: multiple definition of 'enum HTTPMethod' enum HTTPMethod

khoih-prog commented 3 years ago

Thanks for using the libraries and your encouraging words.

This is expected as users seldom uses both libraries together, and the libraries are designed to work independently.

You can easily rewrite/merge those 2 libraries together, just remove the duplicating files / declarations. Just be careful that there could be resource conflicts, memory issue, etc. What board / Ethernet / WiFi are you using ?

I'm sorry I don't have time to do this just to be used only for very rare use cases and close the issue now, unless there are many more similar requests.