This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: undefined reference to `hypot'


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.

Try applying this patch.  You'll have to regenerate your tree+library
to see if it helps.
  % ecosconfig tree
  % make
  % "MAKE application"

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------

Attachment: diffs
Description: Text document

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]