linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "James Stevenson" <james@stev.org>
To: 'James Colannino' <james@colannino.org>,
	'Linux C Programming List' <linux-c-programming@vger.kernel.org>
Subject: RE: Undefined reference to 'fmod'
Date: Wed, 14 Jun 2006 16:41:07 +0100	[thread overview]
Message-ID: <010d01c68fc8$f56e1020$0500ac0a@slider> (raw)
In-Reply-To: <448C59BA.2090706@colannino.org>

Hi,

It cant be not all processors have floating point unit's Therefor it cannot
be in the main standard libary

> -----Original Message-----
> From: linux-c-programming-owner@vger.kernel.org [mailto:linux-c-
> programming-owner@vger.kernel.org] On Behalf Of James Colannino
> Sent: 11 June 2006 18:58
> To: Linux C Programming List
> Subject: Re: Undefined reference to 'fmod'
> 
> Glynn Clements wrote:
> 
> > No, fmod() is in libm, so you have to add -lm to the link command.
> >
> > As a general rule, anything which uses <math.h> has to link against
> > libm.
> 
> Interesting.  Compiling with the argument -lm fixed my problem.  That
> leads me to another question: why are the functions found in math.h in a
> separate library?  I would have thought that all functions found in the
> standard C library would be in glibc (The K&R book I'm reading said that
> math.h is a part of the standard library.)
> 
> James
> --
> My blog: http://www.crazydrclaw.com/
> My homepage: http://james.colannino.org/
> 
> "Blessed is the man, who having nothing to say, abstains from giving
> wordy evidence of the fact." --George Eliot
> -
> To unsubscribe from this list: send the line "unsubscribe linux-c-
> programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



  parent reply	other threads:[~2006-06-14 15:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-11  4:35 Undefined reference to 'fmod' James Colannino
2006-06-11  7:17 ` Steve Graegert
2006-06-11  7:18 ` Glynn Clements
     [not found] ` <17547.46674.360830.637227@cerise.gclements.plus.com>
2006-06-11 17:58   ` James Colannino
2006-06-11 19:20     ` Steve Graegert
2006-06-14 15:41     ` James Stevenson [this message]
2006-06-15  0:20       ` Glynn Clements

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='010d01c68fc8$f56e1020$0500ac0a@slider' \
    --to=james@stev.org \
    --cc=james@colannino.org \
    --cc=linux-c-programming@vger.kernel.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 NNTP newsgroup(s).