|
我是刚学编程的,有个问题:
/*----sqrt.c------*/
#include<stdio.h>
#include<math.h>
main()
{
float a,b;
printf("Enter a value for a:\n");
scanf("%f",&a);
b=sqrt(a);
printf("The result is %f.\n",b);
}
[txw@TCL txw]$ cc -o sqrt sqrt.c
/tmp/cc8Z2pIW.o(.text+0x42): In function `main':
: undefined reference to `sqrt'
collect2: ld returned 1 exit status
[txw@TCL txw]$
难道gcc里没有sqrt()吗????? |
|