You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for you previous help which looks good, however when I added your library into my main application and added the call to events(); I ran into a conflict with other libraries in my project which is using an ESP32 based project with the Arduino IDE. Looks like the conflict is with additional libraries required by the AsyncWebServer library.
task1.cpp:499:9: error: reference to 'events' is ambiguous
events.onConnect([](AsyncEventSourceClient *client){
^
arduino_build_809613\sketch\task1.cpp:227:19: note: candidates are: AsyncEventSource events
AsyncEventSource events("/events");
^
In file included from
arduino_build_809613\sketch\main_framework.h:147:0,
from arduino_build_809613\sketch\task1.cpp:73:
Arduino Sketchbook\libraries\ezTime\src/ezTime.h:177:7: note: void ezt::events()
void events();
^
task1.cpp:504:28: error: reference to 'events' is ambiguous
server.addHandler(&events);
^_
I solved the problem by renaming events to ezEvents in your libraries as they were the easiest to change and last to be added to my application. Is there a better way to do this without changing libraries.
The text was updated successfully, but these errors were encountered:
malbrook
changed the title
events conflicts with AsyncWebBrowser library
events conflicts with AsyncWebServer library
Nov 3, 2018
Ah, yes. The feature that I had built but hadn't gotten round to documenting yet... :)
In your sketch, you put #define EZTIME_EZT_NAMESPACE before the #include <ezTime.h> and then everything that would end up in the root namespace has to be prefixed with ezt::. Everything but the Timezone definitions. So then you would say ezt::events() and ezt::setDebug(INFO) but Timezone myTZ and myTZ.dateTime().
I'll put this in the documentation, had sort of slipped through...
(In fact, you wouldn't need to do this if you don't need the events() from the other library, because the ezt:: namespace always exists, so you can always use the prefix.)
Hi Ron
Thanks for you previous help which looks good, however when I added your library into my main application and added the call to events(); I ran into a conflict with other libraries in my project which is using an ESP32 based project with the Arduino IDE. Looks like the conflict is with additional libraries required by the AsyncWebServer library.
I solved the problem by renaming events to ezEvents in your libraries as they were the easiest to change and last to be added to my application. Is there a better way to do this without changing libraries.
The text was updated successfully, but these errors were encountered: