johnnyfp
Well-known member
Hi,
I'm trying to use a few math functions, in this example the square function, that I can see are in the math.h library (in hardware\tools\avrteensy\avr\include\math.h) but the compiler or more specifically the linker does not seem to find it.
is an example code. I've tried to include the math library as quotes or angle or both, to no avail.
I keep getting
or
.
I can see that the linker is getting the
parameter passed to it.
I've tried this on 1.6.5/1.24 and 1.0.6/1.20 on two different machines.
Have I missed something? Because this compiles fine for a Teensy 2.0 but not the Teensy3.0/3.1/LC
Thanks
I'm trying to use a few math functions, in this example the square function, that I can see are in the math.h library (in hardware\tools\avrteensy\avr\include\math.h) but the compiler or more specifically the linker does not seem to find it.
Code:
#include <math.h>
#include "math.h"
void setup() {
float ff = 10;
float xy = 0;
xy = square(ff);
}
void loop() {
;
}
is an example code. I've tried to include the math library as quotes or angle or both, to no avail.
I keep getting
Code:
error: 'square' was not declared in this scope
Code:
undefined reference to `square'
I can see that the linker is getting the
Code:
-larm_cortexM4l_math -lm
I've tried this on 1.6.5/1.24 and 1.0.6/1.20 on two different machines.
Have I missed something? Because this compiles fine for a Teensy 2.0 but not the Teensy3.0/3.1/LC
Thanks