gmag11/NtpClient

reference to 'map' is ambiguous

Shumatic opened this issue · 3 comments

Hi

I have encountered an error with this simplified sketch

After I have updated ESP8266 board from 2.4.2 -> 2.5.0
i get an error saying "reference to 'map' is ambiguous"
I don´t know what is causing the error, but if i remove either of the 2 libs NtpClientLib or ESP8266mDNS.h i don´t get the error
NtpClientLib is version 2.5.1 the only newer i can find are beta´s

BR Jesper

`#include <NtpClientLib.h>
#include <ESP8266mDNS.h>

void setup() {
// put your setup code here, to run once:
int x = map(55, 1000, 3, 5, 800);
}

void loop() {
}`

Hi. I guess that map is not used inside NTPClientLib. Could it be any of the included files?

Check what is included below here https://github.com/gmag11/NtpClient/blob/master/src/NtpClientLib.h#L43

Hi, I know this is an old thread, but it annoys me.... And maybe it does not relate to you code, but any help would be appreciated.
I found out that I get the same error if i only included "using namespace std; , that is inside your" <NtpClientLib.h>

I can't figure out why, the only connection with ESP8266mDNS is, they also use std. but none of it relate to MAP

This is the code that throws the err
"reference to 'map' is ambiguous"

using namespace std;
#include <ESP8266mDNS.h>
void setup() {
// put your setup code here, to run once:
int x = map(55, 1000, 3, 5, 800);
}
void loop() {
}

Hi
This question is not related to this repository. Please use any Arduino forum. Sorry