Compile problem when using keyword 'new' on Raspberry Pi I have the following line of code in my Arduino sketch:

static double *temps = new double[arraySize];  //Declare array to hold tempratures, place the array on the heap where it will not be deleted and keep the pointer as a static
//double temps[arraySize];


When I compile with the Arduino IDE on Ubuntu it compiles just fine. However, when I compile on the Raspberry Pi, it throws up the following error:

xxx.cpp.o: In function `last Function in file()':
xxx.cpp:[last line in file]: undefined referance to `operator new[] (unsigned int)'
collect2: error: ld returned 1 exit status


Is this a bug? If so, how do I report it? If not, why is it throwing this error or how else can I declare a static array of doubles (needs to be static, I calculate an average of some incoming data over several function calls)?
The Arduino uses AVR libc which does not provide a complete C++ environment.

Among other things AVR libc does not support new and delete. See the FAQ for more information.

Some versions of the Arduino libraries may provide new and delete but they are just wrappers around malloc and free. I suggest not using new and delete on arduino because they do not have the same behavior as C++. For example destructors will not be called on the arduino when delete is called.