Closed lmarmisa closed 1 year ago
Everything should be back to normal after you comment the declaration on this line: $HOME/.arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include/espconn.h:447:16
espconn backported from espressif is not widely used so we are not aware of every issues with it.
Please tell us if this solves your issue.
Hi d-a-v,
Thanks for the workaround. Working pretty well now.
I hope that this issue will be fixed in future releases.
Best regards,
Luis
. . . . . .
/******************************************************************************
* TypedefName : dns_found_callback
* Description : Callback which is invoked when a hostname is found.
* Parameters : name -- pointer to the name that was looked up.
* ipaddr -- pointer to an ipv4_addr_t containing the IP address of
* the hostname, or NULL if the name could not be found (or on any
* other error).
* callback_arg -- a user-specified callback argument passed to
* dns_gethostbyname
*******************************************************************************/
//typedef void (*dns_found_callback)(const char *name, ipv4_addr_t *ipaddr, void *callback_arg);
. . . . . .
EDIT: sorry just realized the following comment was intended for esphome rather than arduino, posted on the wrong thread but leaving it here in case any of this is helpful anway.
FWIW this is still not fixed in esphome 2024.5.2, in so much as any attempt to #include espconn.h from a custom component will fail with this compile error.
In case it's helpful for anyone else using espconn.h, rather rather than edit the SDK file (to comment out the line) I made the following hack in my own header file to workaround the issue at the place where I'm #including it.
#define dns_found_callback espconn_dns_found_callback
#include "espconn.h"
#undef dns_found_callback
Basic Infos
Platform
Settings in IDE
Problem Description
A weird compilation problem has appeared since version 3.2. It is related to _typedef void (dns_found_callback)(const char name, ipv4_addr_t ipaddr, void callbackarg);
I get several compilation errors of this type: _error: conflicting declaration 'typedef void ( dns_found_callback)(const char, ip4_addrt, void)'
Two files seem involved: 1) $HOME/.arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include/lwip/dns.h:103:16 2) $HOME/.arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include/espconn.h:447:16
No compilation problem at all using release 3.0.2. None of my programs use the typedef _dns_foundcallback.
I would like to migrate to new releases, but I am unable to compile my project with the current toolchain & Arduino IDE.
The information provided by the compiler related to this error seem useless: