When you link you need to add -lm.
>
> -----Original Message-----
> From: Rick St Jean [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 25, 2004 9:42 AM
> To: [email protected]
>
> I have the need for the square root function in one of my
> calculations.
>
> at the top of my noncombat.c file I added #include <math.h>
> when I put in the sqrt(double x)within my function I have an
> error returned that sqrt is undefined. I am running mandrake
> with gcc 3.0. am I missing something obvious?
>
> Thanks
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>