Go Down

Topic: Suddenly got this ULONG_MAX compile error (Read 23 times) previous topic - next topic

Stanley

Hi,

I've been compiling and updating this codes for more than one year without issues and suddenly I got this error messages :-

"error: 'ULONG_MAX' was not declared in this scope"


The error messages appears on 1.05, 1.5.6 and 1.6.3

But when I compile the Examples from tinyGPS++, there were no compile errors...

I even tried to hardcode #define ULONG_MAX  but the errors still appear

Code: [Select]

#define ULONG_MAX 4294967295UL



Compiling on standard UNO or Mini Pro 5V/16Mhz..


Any suggestions to fix this compilation errors ??



Code: [Select]

Arduino\libraries\TinyGPSPlus\TinyGPS++.cpp:24:
Arduino\libraries\TinyGPSPlus\/TinyGPS++.h: In member function 'uint32_t TinyGPSLocation::age() const':
Arduino\libraries\TinyGPSPlus\/TinyGPS++.h:59: error: 'ULONG_MAX' was not declared in this scope
Arduino\libraries\TinyGPSPlus\/TinyGPS++.h: In member function 'uint32_t TinyGPSDate::age() const':
Arduino\libraries\TinyGPSPlus\/TinyGPS++.h:83: error: 'ULONG_MAX' was not declared in this scope
Arduino\libraries\TinyGPSPlus\/TinyGPS++.h: In member function 'uint32_t TinyGPSTime::age() const':
Arduino\libraries\TinyGPSPlus\/TinyGPS++.h:107: error: 'ULONG_MAX' was not declared in this scope
Arduino\libraries\TinyGPSPlus\/TinyGPS++.h: In member function 'uint32_t TinyGPSDecimal::age() const':
Arduino\libraries\TinyGPSPlus\/TinyGPS++.h:132: error: 'ULONG_MAX' was not declared in this scope
Arduino\libraries\TinyGPSPlus\/TinyGPS++.h: In member function 'uint32_t TinyGPSInteger::age() const':
Arduino\libraries\TinyGPSPlus\/TinyGPS++.h:152: error: 'ULONG_MAX' was not declared in this scope
Arduino\libraries\TinyGPSPlus\/TinyGPS++.h: In member function 'uint32_t TinyGPSCustom::age() const':
Arduino\libraries\TinyGPSPlus\/TinyGPS++.h:197: error: 'ULONG_MAX' was not declared in this scope


My codes on github are located at :-

https://github.com/stanleyseow/ArduinoTracker-MicroAPRS

Stanley

I found the issue and it was related to GRBL library ...

When I saw the includes libs below :-
Using library grbl in folder: \Arduino\libraries\grbl (legacy)
Using library TinyGPSPlus in folder: \Arduino\libraries\TinyGPSPlus (legacy)




Inside the grbl libraries have it's own limits.h file that over-written the default limits.h


Any idea why the IDE uses a user installed libraries of limits.h when I include #include <limits.h>


Are there like a priority of search path for the header files ??

How do I fix this without removing grbl from the library list ??





Go Up