[ILUG] math.h and sqrt() function

From: Philip Trickett (philipt at domain informatic.ie)
Date: Wed 14 Apr 1999 - 14:58:04 IST


Hi, me yet again.

I have read all I can this time, both in books, include files, man
pages, info pages, etc.etc., but for the life of me I can't figure out
why I can't get the damn sqrt() function to work.

I have included math.h, I have even searched to see if I was including
the wrong one, but I can't find another.

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

Cheers,

Phil



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