|
I am new with linux.There're some trouble with my first program.Can Anyone give me some clue?
::::
#include<stdio.h>
#include<math.h>
int main(void)
{
double pi=M_PI;
double pisqrt;
long i;
for (i=0;i<10000000;++i)
{
pisqrt = sqrt(pi);
}
return 0;
}
The erro message is"
/tmp/ccr8tIwR.o(.text+0x3c): In function `main':
: undefined reference to `sqrt'
collect2: ld returned 1 exit status
"
What's the matter? |
|