Hi,
Same here,
I got the following error:
math1.c:(.text+0x5c): undefined reference to `pow'
Refer to C library, double pow(double, double) is a library function. I
don't know why pow is not resolved.
I am using ubuntu hardy on amd64.
anyone know why?
Frank,
============
#include <stdio.h>
#include <math.h>
int main()
{
double x,y,z;
x=64.0;
y=3.0;
z=0.5;
printf("pow( 64.0,3.0) returns: %7.0f\n", pow(x,y));
printf("sqrt( 64.0) returns: %2.0f\n", sqrt(64.0)) ; // I
assume you have a typo
printf("pow( 64.0,0.5) returns: %2.0f\n", pow(x,z));
return 0;
}
===============