|
简单的程序:
#include<math.h>
#include<stdio.h>
int main()
{
pow(3,3);
}
编译能通过.
但是
#include<math.h>
#include<stdio.h>
int main()
{
int n=3;
pow(n,3);
}
就有问题
[root@localhost program]# gcc -o main test2.c
/tmp/cccDOOAE.o(.text+0x3a): In function `main':
: undefined reference to `pow'
collect2: ld returned 1 exit status
不知道怎么搞的,哪位大哥懂得帮忙一下 |
|