it seems that any program that i try to compile (using gcc) that needs the math.h library doesnt have the required functions.
when i use the following program: (sorry i dont know how to put it in the boxes and im in a hurry)
#include <stdio.h>
#include <math.h>
int main()
{
float s1=sin(M_PI/2);
float s2=cos(M_PI/2);
float s3=tan(M_PI/2);
return 1;
}
i get: (again, sry)
/tmp/ccia1gtc.o: In function `main':
test.c
.text+0x2c): undefined reference to `sin'
test.c
.text+0x46): undefined reference to `cos'
test.c
.text+0x60): undefined reference to `tan'
collect2: ld returned 1 exit status
any suggestions?