public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Maurizio Loreti <loreti@pd.infn.it>
To: help-gcc@gnu.org
Subject: Re: math.h
Date: Tue, 19 Oct 1999 23:13:00 -0000	[thread overview]
Message-ID: <rmyacyshdj.fsf@mlinux.pd.infn.it> (raw)
In-Reply-To: <380D58F1.B400EF83@primenet.com>

"Dennis J. Sylvester" <dsylvest@primenet.com> writes:

> I tried using the sqrt() function with gcc and get an error : undefined
> reference to 'sqrt'.

Did you link the math library?  I mean, did you type "-lm", like in

gcc -ansi -pedantic -Wall -o foo foo.c -lm

?`

-- 
Maurizio Loreti                         http://www.pd.infn.it/~loreti/mlo.html
Univ. of Padova, Dept. of Physics - Padova, Italy            loreti@pd.infn.it

WARNING: multiple messages have this Message-ID
From: Maurizio Loreti <loreti@pd.infn.it>
To: help-gcc@gnu.org
Subject: Re: math.h
Date: Sun, 31 Oct 1999 13:57:00 -0000	[thread overview]
Message-ID: <rmyacyshdj.fsf@mlinux.pd.infn.it> (raw)
Message-ID: <19991031135700.f-WDc2rFU6gC4gTep4aC0VFy55mDmPffCKBZaBwn3Oo@z> (raw)
In-Reply-To: <380D58F1.B400EF83@primenet.com>

"Dennis J. Sylvester" <dsylvest@primenet.com> writes:

> I tried using the sqrt() function with gcc and get an error : undefined
> reference to 'sqrt'.

Did you link the math library?  I mean, did you type "-lm", like in

gcc -ansi -pedantic -Wall -o foo foo.c -lm

?`

-- 
Maurizio Loreti                         http://www.pd.infn.it/~loreti/mlo.html
Univ. of Padova, Dept. of Physics - Padova, Italy            loreti@pd.infn.it

  parent reply	other threads:[~1999-10-19 23:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-19 21:55 math.h Dennis J. Sylvester
1999-10-19 22:29 ` math.h Arthur Gold
1999-10-31 13:57   ` math.h Arthur Gold
1999-10-19 23:13 ` Maurizio Loreti [this message]
1999-10-31 13:57   ` math.h Maurizio Loreti
1999-10-31 13:57 ` math.h Dennis J. Sylvester
2000-01-12  9:16 math.h Tom Filley
2000-04-01  0:00 ` math.h Tom Filley
2005-04-05  9:01 math.h John Poma
2005-04-05  9:21 ` math.h Leopold Palomo-Avellaneda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=rmyacyshdj.fsf@mlinux.pd.infn.it \
    --to=loreti@pd.infn.it \
    --cc=help-gcc@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).