maniacbug / StandardCplusplus

Standard C++ for Arduino (port of uClibc++)
588 stars 182 forks source link

abs macro in Arduino.h collides with abs() function in cstdlib header #10

Closed jorenheit closed 1 year ago

jorenheit commented 9 years ago

I got compilation errors due to a macro (abs) defined in Arduino.h. Encapsulating the inline definition of the abs() function in the cstdlib header, in #ifndef ... #endif directives fixed this issue. I hope I didn't break anything else in the meantime...

webelcomau commented 8 years ago

similar problem, had to switch to explicit fabs(float) when using StandardCplusplus, abs() started giving 0.

Bravo555 commented 8 years ago

Same problem here.

maniacbug commented 1 year ago

Fixed in #34