Re: [code] What the hell?

jelson@jhu.edu
Date: 10/03/96


> I am trying to use the sqrt() function... square roots. man sqrt says it's
> included from math.h. I included math.h.
> Compiles fine.
> Links and I get:
> utils.o(.text+0x4518): undefined reference to 'sqrt'
> make: *** [../bin/circle.new] Error 1
> 
> I take out the #include <math.h> and it says implicit delceration of
> function 'sqrt' so I know the math.h needs to be included... but it cant
> find the function anywhere... any hints/ideas/suggestions?

Use -lm to link along with any other libraries you might be using.

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST