求助:undefined reference to `pow'
kyzww 2010-08-10 01:15:43 #include <stdio.h>
#include <math.h>
int main()
{
double a = 10.0,b = 3.0;
float c;
c = pow(a,b);
printf("%f\n",c);
}
编译结果:
/tmp/ccibw7gz.o: In function `main':
test.c:(.text+0x2d): undefined reference to `pow'
collect2: ld returned 1 exit status
这是怎么回事? /usr/include/下面也有math.h这个文件