Closed EmperorArthur closed 3 years ago
Hi,
Thanks for your interests in the library and your Feature Request: Add a RequestHandler subclass which passes the server to the function #27
For more info on why and how to use correctly or fix this, check
I'll consider to add cpp version besides the h-only version later if there are more requests as this issue happens only in rare use-cases or when inclusion is not carefully considered.
More notes
I don't know if you go through the examples before writing this line
Due to the way the code is written, #include
can never be used in a header file.
For examples #include
or can be used in other library code
For example #include
Hello,
Apologies for not being more clear. I meant to say, "#include <EthernetWebServer.h>
can never be included in a header file which is included by more than one ".cpp" file."
We were unaware of the "AsyncHTTPRequest_Generic library" until now, and thank you for responding to our question. I had never even heard of your . I see your response to my suggestion there.
Unfortunately, a requirement of the project is that someone can download the code and follow the standard PlatformIO build instructions to run it, therefore modifying the library files is nor allowed. In addition, as this is a relatively large code base, eschewing C/C++ convention and converting everything to "-impl.h" files is also a hard pass.
With this in mind, we have determined that your library is not suitable for a production environment, and will continue searching for alternatives.
Thank you for your time.
Hello,
Due to the way the code is written,
#include <EthernetWebServer.h>
can never be used in a header file.It always results in a multiple definition error.
I believe the problem can be traced to these two lines in "EthernetWebServer.h"
It may be better to convert the "*-impl.h" files to instead be ".cpp" files, which are linked at compile time.