pow(),cos() ....
Alex Kononov
a.kononov@lr.tudelft.nl
Tue Sep 26 02:58:00 GMT 2000
A very simple math c-program lile this
#include <stdio.h>
#include <math.h>
int main()
{
double t1,t2,t3;
t2=2.0;
t3=3.0;
t1 = pow(t2,t3);
t2 = cos(t3);
printf(" t1= %10.7f \n", t1);
printf(" t2= %10.7f \n", t2);
return 0;
}
with GCC version 2.95.2 19991024 (release) on
Linux SuSe 7.0 after
(gcc ctest.c -o ctest) results in
udefined reference to 'pow'
udefined reference to 'cos'
What am I doing whrong?
More information about the Gcc
mailing list