Question about math.h
Posted: Sat Jun 11, 2016 5:38 am
I have a question about using math.h with the open sdk
This compiles:
But this does not:
The error is confusing me because it's an undefined reference to the function sin.
Anyone got some clues on this?
Thanks,
smh
This compiles:
Code: Select all
float foo = sin(3.14159);
But this does not:
Code: Select all
float mypi = 3.14159;
float foo = sin(mypi);
The error is confusing me because it's an undefined reference to the function sin.
Code: Select all
user_main.c:(.irom0.text+0xb4): undefined reference to `sin'
user_main.o: In function `my_function':
user_main.c:(.irom0.text+0x115): undefined reference to `sin'
collect2: error: ld returned 1 exit status
Anyone got some clues on this?
Thanks,
smh