Hi all ! I'm getting "undefined reference to sin" for a simple program:
int main ()
double a = 40.5;
double b = sin (a);
The compiler is : arm-linux-gnueabi-gcc Thanks in advance.
Perhaps the link option -lm helps?
Thanks a lot sir, It compiled straight away with that option. I was trying it for 2 days.
hello ! I have the same problem, but I have just started to program with C and I have not undestood your answer, insert -lm... what I must do to compilate good my program ? sorry for my bad english !!! thank you
That depends on how you build your program (which IDE or a makefile?).