Re: [ILUG] math.h and sqrt() function

From: Sean McGrath (sean at domain hdl.ie)
Date: Wed 14 Apr 1999 - 15:23:03 IST


Philip Trickett wrote:

> So could anyone please tell me why I get when I compile:
> [phil at domain jalapeno src]$ gcc mathtest.c
> /tmp/ccVM9ceB.o: In function `main':
> /tmp/ccVM9ceB.o(.text+0x38): undefined reference to `sqrt'
> /tmp/ccVM9ceB.o(.text+0x6b): undefined reference to `sqrt'
> collect2: ld returned 1 exit status

   you're not including the maths library..
   try:
      gcc mathtest.c -lm

>
> Cheers,
>
> Phil
>

Sean.
.



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:04:07 GMT