gmag11 / NtpClient

NTP client libary for sync ESP8266 time via WiFi
GNU General Public License v3.0
186 stars 74 forks source link

compile error with last esp8266 arduino 2.50beta3 #80

Closed stef-ladefense closed 5 years ago

stef-ladefense commented 5 years ago

hi, with last core 2.50 beta 3, with your branch develop of this day, compil error :

C:\Users\stephane\Documents\Arduino\libraries\NtpClient-develop\src\NTPClientLib.cpp: In member function 'void NTPClient::dnsFound(const ip4_addr*)':

C:\Users\stephane\Documents\Arduino\libraries\NtpClient-develop\src\NTPClientLib.cpp:224:46: error: ambiguous overload for 'operator!=' (operand types are 'IPAddress' and 'int')

 if (ipaddr != NULL && ntpServerIPAddress != 0)

                                          ^

C:\Users\stephane\Documents\Arduino\libraries\NtpClient-develop\src\NTPClientLib.cpp:224:46: note: candidates are:

C:\Users\stephane\Documents\Arduino\libraries\NtpClient-develop\src\NTPClientLib.cpp:224:46: note: operator!=(uint32_t {aka unsigned int}, int)

C:\Users\stephane\Documents\Arduino\libraries\NtpClient-develop\src\NTPClientLib.cpp:224:46: note: operator!=(const ip_addr_t {aka const ip4_addr}, const ip_addr_t {aka const ip4_addr})

C:\Users\stephane\Documents\Arduino\libraries\NtpClient-develop\src\NTPClientLib.cpp:224:46: note: operator!=(ip_addr_t {aka ip4_addr}, ip_addr_t {aka ip4_addr})

In file included from C:\Users\stephane\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0-beta3\libraries\ESP8266WiFi\src/ESP8266WiFi.h:31:0,

             from C:\Users\stephane\Documents\Arduino\libraries\NtpClient-develop\src\NtpClientLib.h:104,

             from C:\Users\stephane\Documents\Arduino\libraries\NtpClient-develop\src\NTPClientLib.cpp:32:

C:\Users\stephane\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0-beta3\cores\esp8266/IPAddress.h:101:14: note: bool IPAddress::operator!=(const IPAddress&) const

     bool operator!=(const IPAddress& addr) const {

          ^

C:\Users\stephane\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0-beta3\cores\esp8266/IPAddress.h:110:14: note: bool IPAddress::operator!=(uint32_t) const

     bool operator!=(uint32_t addr) const {

          ^

C:\Users\stephane\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0-beta3\cores\esp8266/IPAddress.h:113:14: note: bool IPAddress::operator!=(u32_t) const

     bool operator!=(u32_t addr) const {

          ^

exit status 1 Erreur de compilation pour la carte LOLIN(WEMOS) D1 R2 & mini

good luck :)

bill-orange commented 5 years ago

Please try compiling with different LwIP versions. I have the same error and can not do the test right now.

gmag11 commented 5 years ago

Please try latest release 3.0.0-beta. I close the issue, reopen it if you still have problems.