[GH-ISSUE #139] using WiFiManager trunk causes the compile error: 'isnan' was not declared in this scope #108

Closed
opened 2026-02-28 01:23:27 +03:00 by kerem · 14 comments
Owner

Originally created by @WilliamFrasson on GitHub (Mar 27, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/139

hello
using WiFiManager trunk causes the compile error: "'isnan' was not declared in this scope"
while using the tag 0.10 this problem doesn't happen

I tring to use the trunk to improve some issue about connection but this new question is raised now.

Originally created by @WilliamFrasson on GitHub (Mar 27, 2016). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/139 hello using WiFiManager trunk causes the compile error: "'isnan' was not declared in this scope" while using the tag 0.10 this problem doesn't happen I tring to use the trunk to improve some issue about connection but this new question is raised now.
kerem closed this issue 2026-02-28 01:23:27 +03:00
Author
Owner

@tzapu commented on GitHub (Mar 29, 2016):

hmm, are you using isnan in your code somewhere?

<!-- gh-comment-id:202723524 --> @tzapu commented on GitHub (Mar 29, 2016): hmm, are you using isnan in your code somewhere?
Author
Owner

@WilliamFrasson commented on GitHub (Mar 29, 2016):

Yes.
Using 0.10 the code compile while using the truck the compile fail to isnan
After Commenting isnan(..) calls the code compile.
..real Strange to me. But i see that there are some new #undef .. max and
min.. maybe these cause this behaviour.
Il 29/Mar/2016 07:45, "tzapu" notifications@github.com ha scritto:

hmm, are you using isnan in your code somewhere?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/tzapu/WiFiManager/issues/139#issuecomment-202723524

<!-- gh-comment-id:202724825 --> @WilliamFrasson commented on GitHub (Mar 29, 2016): Yes. Using 0.10 the code compile while using the truck the compile fail to isnan After Commenting isnan(..) calls the code compile. ..real Strange to me. But i see that there are some new #undef .. max and min.. maybe these cause this behaviour. Il 29/Mar/2016 07:45, "tzapu" notifications@github.com ha scritto: > hmm, are you using isnan in your code somewhere? > > — > You are receiving this because you authored the thread. > Reply to this email directly or view it on GitHub > https://github.com/tzapu/WiFiManager/issues/139#issuecomment-202723524
Author
Owner

@tzapu commented on GitHub (Mar 29, 2016):

well, they are connected, not themselves, but the library that now gets included... pain in the arse ...

i ll get back to you

<!-- gh-comment-id:202725633 --> @tzapu commented on GitHub (Mar 29, 2016): well, they are connected, not themselves, but the library that now gets included... pain in the arse ... i ll get back to you
Author
Owner

@tzapu commented on GitHub (Mar 29, 2016):

could you try it as std::isnan(...)

cheers

<!-- gh-comment-id:202725768 --> @tzapu commented on GitHub (Mar 29, 2016): could you try it as std::isnan(...) cheers
Author
Owner

@WilliamFrasson commented on GitHub (Mar 29, 2016):

I used standard arduino

float pippo;
...
if isnan(pippo)
..
Il 29/Mar/2016 07:56, "tzapu" notifications@github.com ha scritto:

could you try it as std::isnan(...)

cheers


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/tzapu/WiFiManager/issues/139#issuecomment-202725768

<!-- gh-comment-id:202726871 --> @WilliamFrasson commented on GitHub (Mar 29, 2016): I used standard arduino float pippo; ... if isnan(pippo) .. Il 29/Mar/2016 07:56, "tzapu" notifications@github.com ha scritto: > could you try it as std::isnan(...) > > cheers > > — > You are receiving this because you authored the thread. > Reply to this email directly or view it on GitHub > https://github.com/tzapu/WiFiManager/issues/139#issuecomment-202725768
Author
Owner

@tzapu commented on GitHub (Mar 29, 2016):

no , i meant actually type it code like

if(std::isnan(pippo))

<!-- gh-comment-id:202738336 --> @tzapu commented on GitHub (Mar 29, 2016): no , i meant actually type it code like `if(std::isnan(pippo))`
Author
Owner

@acca84 commented on GitHub (Apr 5, 2016):

Hello
Same problem here for me.
if(std::isnan(pippo)) works with wifimanager v0.11
if(isnan(pippo)) works with wifimanager v0.9

the problem is with librarys using isnan

could you do something please ?

<!-- gh-comment-id:205806989 --> @acca84 commented on GitHub (Apr 5, 2016): Hello Same problem here for me. if(std::isnan(pippo)) works with wifimanager v0.11 if(isnan(pippo)) works with wifimanager v0.9 the problem is with librarys using isnan could you do something please ?
Author
Owner

@tzapu commented on GitHub (Apr 5, 2016):

so there would be a conflict in libraries not using the namespace then ? :(

that s ... not good

<!-- gh-comment-id:205810886 --> @tzapu commented on GitHub (Apr 5, 2016): so there would be a conflict in libraries not using the namespace then ? :( that s ... not good
Author
Owner

@acca84 commented on GitHub (Apr 5, 2016):

Yes there is a problem with many libs, ie : thingspeak and DHT at least

<!-- gh-comment-id:205820467 --> @acca84 commented on GitHub (Apr 5, 2016): Yes there is a problem with many libs, ie : thingspeak and DHT at least
Author
Owner

@ostersc commented on GitHub (Apr 14, 2016):

I have this problem with released version .11 and using the thingspeak library as well. Is there a work around?

<!-- gh-comment-id:209758070 --> @ostersc commented on GitHub (Apr 14, 2016): I have this problem with released version .11 and using the thingspeak library as well. Is there a work around?
Author
Owner

@tzapu commented on GitHub (Apr 14, 2016):

yes, i ll switch back to a loop sort and rerelease

i m just away currently to sort it immediately

thanks for letting me know

On 14 Apr 2016, at 07:33, ostersc notifications@github.com wrote:

I have this problem with released version .11 and using the thingspeak library as well. Is there a work around?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub https://github.com/tzapu/WiFiManager/issues/139#issuecomment-209758070

<!-- gh-comment-id:209852213 --> @tzapu commented on GitHub (Apr 14, 2016): yes, i ll switch back to a loop sort and rerelease i m just away currently to sort it immediately thanks for letting me know > On 14 Apr 2016, at 07:33, ostersc notifications@github.com wrote: > > I have this problem with released version .11 and using the thingspeak library as well. Is there a work around? > > — > You are receiving this because you commented. > Reply to this email directly or view it on GitHub https://github.com/tzapu/WiFiManager/issues/139#issuecomment-209758070
Author
Owner

@ostersc commented on GitHub (Apr 14, 2016):

Some details for you of what I see with v.11 and not v.10
error: 'isnan' was not declared in this scope
error: 'isinf' was not declared in this scope

Arduino: 1.6.6 (Mac OS X), Board: "SparkFun ESP8266 Thing, 80 MHz, Serial, 115200"

Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h: In member function 'int ThingSpeakClass::writeFields(long unsigned int, const char*)':
Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:778:30: error: 'isnan' was not declared in this scope
if(!isnan(nextWriteLatitude))
^
Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:778:30: note: suggested alternative:
In file included from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/random:38:0,
from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:65,
from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62,
from Documents/Arduino/libraries/WiFiManager/WiFiManager.h:22,

Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/cmath:632:5: note: 'std::isnan'
isnan(_Tp __x)
^

Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:789:37: error: 'isnan' was not declared in this scope
if(!isnan(this->nextWriteLongitude))
^
Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:789:37: note: suggested alternative:
In file included from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/random:38:0,
from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:65,
from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62,
from Documents/Arduino/libraries/WiFiManager/WiFiManager.h:22,

Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/cmath:632:5: note: 'std::isnan'
isnan(_Tp __x)
^

Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:801:37: error: 'isnan' was not declared in this scope
if(!isnan(this->nextWriteElevation))
^
Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:801:37: note: suggested alternative:
In file included from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/random:38:0,
from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:65,
from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62,
from Documents/Arduino/libraries/WiFiManager/WiFiManager.h:22,

Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/cmath:632:5: note: 'std::isnan'
isnan(_Tp __x)
^

Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h: In member function 'int ThingSpeakClass::convertFloatToChar(float, char*)':
Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:1469:22: error: 'isinf' was not declared in this scope
if(0 == isinf(value) && (value > 999999000000 || value < -999999000000))
^
Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:1469:22: note: suggested alternative:
In file included from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/random:38:0,
from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:65,
from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62,
from Documents/Arduino/libraries/WiFiManager/WiFiManager.h:22,

Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/cmath:614:5: note: 'std::isinf'
isinf(_Tp __x)
^

Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h: In member function 'float ThingSpeakClass::convertStringToFloat(String)':
Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:1488:23: error: 'isinf' was not declared in this scope
if(1 == isinf(result) && *value.c_str() == '-')
^
Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:1488:23: note: suggested alternative:
In file included from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/random:38:0,
from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:65,
from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62,
from Documents/Arduino/libraries/WiFiManager/WiFiManager.h:22,

Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/cmath:614:5: note: 'std::isinf'
isinf(_Tp __x)
^

<!-- gh-comment-id:209965187 --> @ostersc commented on GitHub (Apr 14, 2016): Some details for you of what I see with v.11 and not v.10 error: 'isnan' was not declared in this scope error: 'isinf' was not declared in this scope Arduino: 1.6.6 (Mac OS X), Board: "SparkFun ESP8266 Thing, 80 MHz, Serial, 115200" Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h: In member function 'int ThingSpeakClass::writeFields(long unsigned int, const char*)': Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:778:30: error: 'isnan' was not declared in this scope if(!isnan(nextWriteLatitude)) ^ Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:778:30: note: suggested alternative: In file included from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/random:38:0, from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:65, from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62, from Documents/Arduino/libraries/WiFiManager/WiFiManager.h:22, Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/cmath:632:5: note: 'std::isnan' isnan(_Tp __x) ^ Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:789:37: error: 'isnan' was not declared in this scope if(!isnan(this->nextWriteLongitude)) ^ Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:789:37: note: suggested alternative: In file included from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/random:38:0, from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:65, from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62, from Documents/Arduino/libraries/WiFiManager/WiFiManager.h:22, Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/cmath:632:5: note: 'std::isnan' isnan(_Tp __x) ^ Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:801:37: error: 'isnan' was not declared in this scope if(!isnan(this->nextWriteElevation)) ^ Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:801:37: note: suggested alternative: In file included from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/random:38:0, from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:65, from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62, from Documents/Arduino/libraries/WiFiManager/WiFiManager.h:22, Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/cmath:632:5: note: 'std::isnan' isnan(_Tp __x) ^ Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h: In member function 'int ThingSpeakClass::convertFloatToChar(float, char*)': Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:1469:22: error: 'isinf' was not declared in this scope if(0 == isinf(value) && (value > 999999000000 || value < -999999000000)) ^ Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:1469:22: note: suggested alternative: In file included from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/random:38:0, from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:65, from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62, from Documents/Arduino/libraries/WiFiManager/WiFiManager.h:22, Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/cmath:614:5: note: 'std::isinf' isinf(_Tp __x) ^ Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h: In member function 'float ThingSpeakClass::convertStringToFloat(String)': Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:1488:23: error: 'isinf' was not declared in this scope if(1 == isinf(result) && *value.c_str() == '-') ^ Documents/Arduino/libraries/ThingSpeak/src/ThingSpeak.h:1488:23: note: suggested alternative: In file included from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/random:38:0, from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:65, from Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62, from Documents/Arduino/libraries/WiFiManager/WiFiManager.h:22, Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/cmath:614:5: note: 'std::isinf' isinf(_Tp __x) ^
Author
Owner

@astrohome commented on GitHub (Apr 26, 2016):

The workaround I found is:

#include <math.h>

.....

if (std::isnan(value))

<!-- gh-comment-id:214863766 --> @astrohome commented on GitHub (Apr 26, 2016): The workaround I found is: `#include <math.h>` ..... `if (std::isnan(value))`
Author
Owner

@tzapu commented on GitHub (May 8, 2016):

guys, thanks for reporting this and sorry it took so long to get back to you.

i ve just pushed some changes that should sort this in the latest git

this will make it s way into the next release asap, so i ll close this issue, please reopen if still a problem

<!-- gh-comment-id:217701712 --> @tzapu commented on GitHub (May 8, 2016): guys, thanks for reporting this and sorry it took so long to get back to you. i ve just pushed some changes that should sort this in the latest git this will make it s way into the next release asap, so i ll close this issue, please reopen if still a problem
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#108
No description provided.