Hi there,
Well, I do understand new
and delete
are not allowed to work on Wiring, but, malloc
doesn't work either unlike Arduino.
There's a problem when I include stdlib.h
because of the following errors:
/media/Dados/dev/.../include/stdlib.h:72: error: expected unqualified-id before 'int'
/media/Dados/dev/.../include/stdlib.h:72: error: expected ')' before 'int'
/media/Dados/dev/.../include/stdlib.h:72: error: expected ')' before 'int'
/media/Dados/dev/.../include/stdlib.h:72: error: expected ')' before 'int'
And those are lines 71 to 74 from stdlib.h
:
_VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn)));
int _EXFUN(abs,(int));
int _EXFUN(atexit,(_VOID (*__func)(_VOID)));
double _EXFUN(atof,(const char *__nptr));
This is not much meaningful...
When I comment this line, some undefined reference errors appear on a pointer (the one I'm trying to allocate) to my object.
I'm not sure what to do except to change the design of the program ...
I also tried placement new
but doesn't seems to work (including <new.h>
doesn't change anything)
Any thoughts?