StandardCplusplus icon indicating copy to clipboard operation
StandardCplusplus copied to clipboard

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

Open jorenheit opened this issue 10 years ago • 2 comments

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...

jorenheit avatar Dec 13 '14 17:12 jorenheit

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

webelcomau avatar Jan 03 '16 10:01 webelcomau

Same problem here.

Bravo555 avatar May 10 '16 20:05 Bravo555

Fixed in #34

maniacbug avatar Jul 05 '23 23:07 maniacbug