This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: undefined reference to `hypot'
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Gary Thomas <gthomas at ecoscentric dot com>
- Cc: vfs at tersy dot ru, eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 18 Sep 2002 15:39:34 +0200
- Subject: Re: [ECOS] undefined reference to `hypot'
- References: <3D887E09.7030408@tersy.ru> <1032355971.17413.29.camel@hermes.chez-thomas.org>
Is hypot part of the relevant standard?
My linux box says for hypot:
CONFORMING TO
SVID 3, BSD 4.3
where as for sqrt is says:
CONFORMING TO
SVID 3, POSIX, BSD 4.3, ISO 9899
What is eCos trying to be complient to?
Andrew
On Wed, Sep 18, 2002 at 07:32:51AM -0600, Gary Thomas wrote:
> On Wed, 2002-09-18 at 07:22, Vladimir Sterjantov wrote:
> > I have a simple question:
> > Having CYGPKG_LIBM in ecos.ecc, compiling this program, i get message:
> >
> > undefined reference to `hypot'
> >
> > There are no problems with `sqrt`,
> > `sqrt` and `hypot` both in math.h,
> > but only `sqrt` in my libtarget.a - Why?
> >
> > #include <math.h>
> > main() {
> > double x, y, res;
> >
> > res = sqrt(x*x + y*y);
> > res = hypot(x, y);
> > }
>
> I'm not sure why, but this function seems to be missing from the CDL.
> The code is in place, so it's not clear if this is just an oversight.
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss