In file included from C:\Program Files\Arduino\hardware\cores\arduino/WProgram.h:4,
c:/program files/arduino/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:80: error: expected unqualified-id before 'int'
c:/program files/arduino/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:80: error: expected `)' before 'int'
c:/program files/arduino/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:80: error: expected `)' before 'int'
c:/program files/arduino/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected unqualified-id before 'int'
c:/program files/arduino/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected `)' before 'int'
c:/program files/arduino/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected `)' before 'int'
c:/program files/arduino/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:144: error: expected identifier before '(' token
c:/program files/arduino/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:144: error: expected `)' before '(' token
c:/program files/arduino/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:144: error: expected ',' or '...' before '(' token
c:/program files/arduino/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:144: error: expected initializer before ')' token
c:/program files/arduino/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:176: error: '__compar_fn_t' has not been declared
In file included from C:\Program Files\Arduino\hardware\cores\arduino/WProgram.h:6,
Hm.. both the max() / min() function calls doesn't work. if i write:
inline void Quadrature::maximum(int max) {
_max = max;
_usingmax = 1;
// adjust position if higher than new maximum
_position = _position < max ? _position : max;
}
instead of:
inline void Quadrature::maximum(int max) {
_max = max;
_usingmax = 1;
// adjust position if higher than new maximum
_position = min(_position, max);
}
all works fine. Is this an Arduino bug? Or do i just need to include one more library? (I've tried to include <math.h> with no effect)