Jouko Kivilahti <[EMAIL PROTECTED]> writes:
> Using pow(x,y); at source does not compile
But it does!
> $ gcc a.c
> /tmp/cc2ik7lo.o(.text+0x1f): In function `main':
> : undefined reference to `pow'
> collect2: ld returned 1 exit status
This is a linker error message. You have to link against l
Jouko Kivilahti <[EMAIL PROTECTED]> writes:
> Using pow(x,y); at source does not compile
But it does!
> $ gcc a.c
> /tmp/cc2ik7lo.o(.text+0x1f): In function `main':
> : undefined reference to `pow'
> collect2: ld returned 1 exit status
This is a linker error message. You have to link against l
Package: libc6-dev
Version: 2.3.1-3
Severity: important
Using pow(x,y); at source does not compile
-- a.c
#include
#include
int main()
{
int a;
a = pow(2,2);
printf("%d\n",a);
return (0);
}
--
$ gcc a.c
/tmp/cc2ik7lo.o(.text+0x1f): In function `main':
: undefined reference to
Package: libc6-dev
Version: 2.3.1-3
Severity: important
Using pow(x,y); at source does not compile
-- a.c
#include
#include
int main()
{
int a;
a = pow(2,2);
printf("%d\n",a);
return (0);
}
--
$ gcc a.c
/tmp/cc2ik7lo.o(.text+0x1f): In function `main':
: undefined reference to
4 matches
Mail list logo