|
一些数学算符通不过编译。下面是测试程序和出错结果:
#include <stdio.h>
#include <math.h>
void main(){
float a;
a=cos(2);
}
[jonny@jonny paper]$ gcc cosine.c
cosine.c: In function `main':
cosine.c:3: warning: return type of `main' is not `int'
/tmp/ccl6oCIj.o(.text+0x1b): In function `main':
: undefined reference to `cos'
collect2: ld returned 1 exit status |
|