#include <math.h> does not work
I just did a clean install of Mandrake 10.0 Official. All works fine except when I go to compile a simple c program including math.h. The compile completes and then I get a ld error:
[jerry@localhost practice]$ gcc divide.c -o divide
/home/jerry/tmp/ccKo59RF.o(.text+0x8c): In function `main':
: undefined reference to `sinf'
collect2: ld returned 1 exit status
I first noticed when trying to compile a simple benchmark program and it would not go. Here is code for divide.c. I am just printing the sine of PI.
#define LIMIT 1000
#define PI 3.14159
int i, j, result;
printf("%d / %d = %d R %d.\n",i,j, i/j, i%j);
printf("Thats all folks!\n");
printf("The sin of 1.5 is: %f\n", num);
any suggestions anyone?