Wiring Forum
http://wiring.org.co/cgi-bin/yabb/YaBB.pl
Programming Questions & Help >> Syntax >> Wiring using old version of Math.h?
http://wiring.org.co/cgi-bin/yabb/YaBB.pl?num=1251639218

Message started by roypardi on 08/30/09 at 13:33:38

Title: Wiring using old version of Math.h?
Post by roypardi on 08/30/09 at 13:33:38
Hi - I was hacking around trying to solve some of the issues I've posted about in a separate thread ("error: variable or field declared void" http://spedr.com/46jbj). After commenting out some code I started getting an error about the function 'hypot' being undefined. I am using some 3rd party C code in my project. I thought this was odd since it seems like a standard math lib function and also, the same project compiles in Arduino. (fwiw - I'd use Arduino for this project just to keep it moving but I only have the Decimilla - and there is not enough program space)

Anyway - it looks like Wiring uses a version of math.h from 2002 and Arduino uses one from 2007. The Arduino version has the 'hypot' function defined.

Is there a reason Wiring uses the older version?

--Roy

Title: Re: Wiring using old version of Math.h?
Post by barragan on 09/01/09 at 06:42:58
hi Roy, you´re right, the hypot seems not being part of the avr-libc 1.4.5 present with the current Wiring distribution, this distribution hasn´t upgrade for a while (2007). So in the meantime, the hypot can be replaced by sqrt(x*x+y*y) as you know, I will rebuild the toolchain for Wiring 0021, and post an urgent release with the update.

Title: Re: Wiring using old version of Math.h?
Post by barragan on 10/13/09 at 01:49:04
hi Roy, the avr toolchain was completely updated for 0021, so the latest math.h is available with it. Le me know.
best.

Title: Re: Wiring using old version of Math.h?
Post by roypardi on 10/13/09 at 01:56:09
Cool! Thanks

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.