Error with compiling the examples of MD_MAX72xx libraries

Hello,

I'm triying to compile the examples of MD_MAX72xx Library but I got the next errors:

C:\Users\kevin\OneDrive\Documents\Arduino\libraries\MD_MAX72XX-master\src\MD_MAX72xx_font.cpp: In member function 'void MD_MAX72XX::buildFontIndex()':
C:\Users\kevin\OneDrive\Documents\Arduino\libraries\MD_MAX72XX-master\src\MD_MAX72xx_font.cpp:40:21: error: 'nullptr' was not declared in this scope
if (_fontIndex == nullptr)
^
C:\Users\kevin\OneDrive\Documents\Arduino\libraries\MD_MAX72XX-master\src\MD_MAX72xx_font.cpp: In member function 'uint8_t MD_MAX72XX::getMaxFontWidth()':
C:\Users\kevin\OneDrive\Documents\Arduino\libraries\MD_MAX72XX-master\src\MD_MAX72xx_font.cpp:61:20: error: 'nullptr' was not declared in this scope
if (_fontData != nullptr)
^
C:\Users\kevin\OneDrive\Documents\Arduino\libraries\MD_MAX72XX-master\src\MD_MAX72xx_font.cpp: In member function 'uint16_t MD_MAX72XX::getFontCharOffset(uint8_t)':
C:\Users\kevin\OneDrive\Documents\Arduino\libraries\MD_MAX72XX-master\src\MD_MAX72xx_font.cpp:89:21: error: 'nullptr' was not declared in this scope
if (_fontIndex != nullptr)
^
C:\Users\kevin\OneDrive\Documents\Arduino\libraries\MD_MAX72XX-master\src\MD_MAX72xx_font.cpp: In member function 'bool MD_MAX72XX::setFont(MD_MAX72XX::fontType_t*)':
C:\Users\kevin\OneDrive\Documents\Arduino\libraries\MD_MAX72XX-master\src\MD_MAX72xx_font.cpp:114:21: error: 'nullptr' was not declared in this scope
_fontData = (f == nullptr ? _sysfont_var : f);
^
C:\Users\kevin\OneDrive\Documents\Arduino\libraries\MD_MAX72XX-master\src\MD_MAX72xx_font.cpp: In member function 'uint8_t MD_MAX72XX::getChar(uint8_t, uint8_t, uint8_t*)':
C:\Users\kevin\OneDrive\Documents\Arduino\libraries\MD_MAX72XX-master\src\MD_MAX72xx_font.cpp:127:14: error: 'nullptr' was not declared in this scope
if (buf == nullptr)
^
Error compiling.

I'm using the Arduino IDE 1.6.5 and I download the library from this webpage: GitHub - MajicDesigns/MD_MAX72XX: LED Matrix Library

Any idea of how to solve it?

What do you have selected in the Tools > Board menu?

Arduino/Genuino Uno

The problem is you are using an outdated version of the Arduino AVR Boards toolchain that does not support the nullptr keyword.

To update the toolchain, do this:

  • Tools > Board > Boards Manager
  • Wait for download to finish.
  • Click on "Arduino AVR Boards".
  • Click "Update".
  • Wait for update to finish.
  • Click "Close".

Thank you very much pert. It works fine now with your recomendation.