This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

undefined reference to `operator new(unsigned int)'

If anyone will ever have this error: When using c++ and singleton the use of operator new is not possible.

I found the solution in this post: forum.arduino.cc/index.php

#include <stdlib.h> // for malloc and free
void* operator new(size_t size) { return malloc(size); }
void operator delete(void* ptr) { if (ptr) free(ptr); }
Related