dear gcc programers:
  I tried to use math lib's power by the following simple code
(actually I copy from 
http://www.java2s.com/Code/C/Math/Howtousepow.htm


that site show this code should run, but I get compiler error about not define 
pow, please help, Eric, in 4.4.3
---------------------
e...@eric-laptop:~$ cat try.c
#include <math.h>
#include <stdio.h>



int main () {

  double x = 10.0, y = 0.0;
  
  do {
    printf("%f\n", pow(x, y));
    y++;
   } while (y<11.0);


 
  return(0);
}
e...@eric-laptop:~$ gcc try.c
/tmp/ccQIeWnf.o: In function `main':
try.c:(.text+0x29): undefined reference to `pow'
collect2: ld returned 1 exit status


---

Reply via email to