Error: 'nullptr' was not declared in this scope

I have a code working on my WiFi LoRa 32 (V2) and trying to het it working on my new Cube Cell HTCC-AB02.

To start, I want to use a library to send data over senML. This works with the ESP bud I get a compilation error with the Cube Cell.

Using the example of the library.

// Simple example that prints thingsml to serial output.
#include <thingsml.h>

#define SERIAL_BAUD_RATE 9600

void print(String message) {
    Serial.println(message);
}


SenMLPack device;
SenMLDoubleRecord temperature(THINGSML_TEMPERATURE);
char buf[100] = {0};

void setup() {
    Serial.begin(SERIAL_BAUD_RATE);

    device.add(temperature);

    temperature.set(21.2);

    device.toJson(buf, 100);

    print(buf);
}

void loop() {
}

Error:

In file included from D:\xxxxxxxx\Arduino\libraries\ThingsML\src/thingsml.h:37:0,
                 from D:\xxxxxxxx\Arduino\libraries\ThingsML\examples\arduino\uno\uno_example\uno_example.ino:2:
D:\xxxxxxxx\Arduino\libraries\ThingsML\src/senml/actuator/senml_binary_actuator.h:49:37: error: 'nullptr' was not declared in this scope
     unsigned char * lastAllocated = nullptr;
                                     ^
In file included from D:\xxxxxxxx\Arduino\libraries\ThingsML\src/thingsml.h:43:0,
                 from D:\xxxxxxxx\Arduino\libraries\ThingsML\examples\arduino\uno\uno_example\uno_example.ino:2:
D:\xxxxxxxx\Arduino\libraries\ThingsML\src/senml/actuator/senml_string_actuator.h:53:28: error: 'nullptr' was not declared in this scope
     char * lastAllocated = nullptr;
                            ^
exit status 1
Fout bij het compileren voor board CubeCell-Board Plus(HTCC-AB02)

Can someone help me?

Use the cubeCell Library and write new code!

Thank you for you’re response.

Witch cubeCell library?

I installed the board and tright some examples form Heltac witch works.

“Nullptr” is a Arduino function and I axially expects that it should work when heltec claim “Perfect Arduino-Compatible!”

Greetings,
Sander

@lansselot. Did you solve this problem? I have the same compilation error with third-party code on CubeCell.

Heltec’s example for the BME280 sensor never worked (with Seeed libraries).

The Adafruit BME280 sensor sketch compiles, uploads and works fine on CubeCell (HTCC-AB02) but ONLY on a Mac Arduino IDE 1.8.13. On a PC the same Arduino IDE throws the ‘nullptr’ error.

See here: https://forum.arduino.cc/t/error-nullptr-was-not-declared-in-this-scope/1045860/3?u=ritrat

No, I still don’t have it working.
So if you can get it to work please let me know.

Same here: cannot upload the same sketch I can upload from a Mac, on Windows. I’m trying also to use the Adafruit BME280 library.