Particle.variable() example on Oak fails to compile

Hello all,

This question is specific to using the Digistump Oak and the web IDE (as opposed to using the Arduino IDE).

I’m having trouble using examples with strings or characters with Particle.variable() examples from ( https://docs.particle.io/reference/firmware/photon/#particle-variable- ). Even stripping down to just this:

String aString;

void setup()
{
  Particle.variable("mess2", aString);
}
void loop()
{
}

Yields

oakstringsample.ino
Linking /workspace/oakstringsample.bin
/workspace/obj/oakstringsample.cpp.o:(.text.setup+0xc): undefined reference to `bool CloudClass::variable<char>(char const*, String const*, particle_core::CloudVariableTypeString const&)'
/workspace/obj/oakstringsample.cpp.o: In function `CloudClass::variable(char const*, String const&)':
/oakCore/cores/oak/OakParticle/OakParticle.h:72: undefined reference to `bool CloudClass::variable<char>(char const*, String const*, particle_core::CloudVariableTypeString const&)'
collect2: error: ld returned 1 exit status
makefile:141: recipe for target 'build' failed
make: *** [build] Error 1
mv: missing destination file operand after '/output/firmware.bin'
Try 'mv --help' for more information

What system version have you set as target?
This error mesage looks like a depricated form of Particle.variable()

You could try

  Particle.variable("mess2", aString, STRING);

On the Oak I’m targeting 1.06 but a post on the Digistump forums indicated this might be on the Oak side.