Compilation fail unter Linux

Hi everyone,

recently I switched from Windows to MX-Linux distro (Debian).

I try to compile (and upload) a project using SSD1306Ascii Library but what I get is

/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/eightanaloginputs -I/home/komnini/Documents/Arduino/libraries/SSD1306Ascii /tmp/build8733269297996352158.tmp/AvrI2c128x64.cpp -o /tmp/build8733269297996352158.tmp/AvrI2c128x64.cpp.o 

In file included from AvrI2c128x64.ino:1:0:
/home/user/Documents/Arduino/libraries/SSD1306Ascii/SSD1306Ascii.h:386:3: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat]
   const uint8_t* m_font = nullptr;  // Current font.
   ^
/home/user/Documents/Arduino/libraries/SSD1306Ascii/SSD1306Ascii.h:56:26: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
 #define SCROLL_MODE_OFF  0
                          ^
/home/user/Documents/Arduino/libraries/SSD1306Ascii/SSD1306Ascii.h:46:29: note: in expansion of macro ‘SCROLL_MODE_OFF’
 #define INITIAL_SCROLL_MODE SCROLL_MODE_OFF
                             ^
/home/user/Documents/Arduino/libraries/SSD1306Ascii/SSD1306Ascii.h:384:26: note: in expansion of macro ‘INITIAL_SCROLL_MODE’
   uint8_t m_scrollMode = INITIAL_SCROLL_MODE;  // Scroll mode for newline.
                          ^
/home/user/Documents/Arduino/libraries/SSD1306Ascii/SSD1306Ascii.h:386:27: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
   const uint8_t* m_font = nullptr;  // Current font.
                           ^
/home/user/Documents/Arduino/libraries/SSD1306Ascii/SSD1306Ascii.h:387:26: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
   uint8_t m_invertMask = 0;  // font invert mask
                          ^
/home/user/Documents/Arduino/libraries/SSD1306Ascii/SSD1306Ascii.h:388:25: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
   uint8_t m_magFactor = 1;   // Magnification factor.
                         ^
/home/user/Documents/Arduino/libraries/SSD1306Ascii/SSD1306Ascii.h:386:27: error: ‘nullptr’ was not declared in this scope
   const uint8_t* m_font = nullptr;  // Current font.
                           ^

There is a solution to add -std=c++11 argument at makefile but I have no clue if this is applicable for Arduino IDE
Looking inside preferences.txt I found nothing where I can add this argument

Any suggestions?
Thanks

PS I use an Arduino Nano 328P and the sketch is this one

#include "SSD1306Ascii.h"
#include "SSD1306AsciiAvrI2c.h"
#define I2C_ADDRESS 0x3C
SSD1306AsciiAvrI2c oled;

void setup() {

  oled.begin(&Adafruit128x64, I2C_ADDRESS);
  oled.setFont(Adafruit5x7);

  uint32_t m = micros();
  oled.clear();
  oled.println("Hello world!");
  oled.println("A long line may be truncated");
  oled.println();
  oled.set2X();
  oled.println("2X demo");
  oled.set1X();
  oled.print("\nmicros: ");
  oled.print(micros() - m);
}

void loop() {}

It looks like you’re using a very outdated version of the Arduino IDE. Likely this is because you installed the Arduino IDE from a package manager like APT. I recommend against ever installing the Arduino IDE from a package manager because it almost invariably results in you getting an outdated version that may have been modified in unspecified ways. Please uninstall that thing and then download the official Arduino IDE from this page:

That should solve the problem.