写了一个程序文件 firstc.c
[code:1]
# include <math.h>
main(){
int m=4;
int k=0;
k=sqrt(m);
printf("%d",k);
}[/code:1]
用以下指令编译
gcc firstc.c
得到的反馈是
[code:1]
/tmp/cc6xoFNA.o(.text+0x31): In function `main':
: undefined reference to `sqrt'
collect2: ld returned 1 exit status[/code:1]