Re: can't compile with sqrt from math.h
From: jpd (read_the_sig_at_do.not.spam.it.invalid)
Date: 07/14/05
- Next message: jpd: "Re: qsort with "compare" function in an 2D array"
- Previous message: Bill Vermillion: "Re: The true meaning of / or root partition??"
- In reply to: bsder: "can't compile with sqrt from math.h"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 14 Jul 2005 15:38:38 GMT
Begin <uynBe.48014$oJ.8723@news-server.bigpond.net.au>
On 2005-07-14, bsder <bsder@bsder.com> wrote:
> Can anyone please help me resolve the following compliation error? The
> following C program failed to compile:
[snip]
> #gcc time-space-2.c
> /var/tmp//ccV6bjTC.o(.text+0x21e): In function `main':
>: undefined reference to `sqrt'
That's not a compilation error, it's a linking error. You need to link
the math library (-lm).
-- j p d (at) d s b (dot) t u d e l f t (dot) n l .
- Next message: jpd: "Re: qsort with "compare" function in an 2D array"
- Previous message: Bill Vermillion: "Re: The true meaning of / or root partition??"
- In reply to: bsder: "can't compile with sqrt from math.h"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|