pow() probably operates on doubles. I imagine that there is a float version for the motes, maybe powf(). Look at the math.h header for your platform, in the include directories for the specific compiler you are using.
MS Xiaohui Liu wrote: > Hi everyone, > > I intend to compute power of x to y, whose type is float. It works well > with TOSSIM by using pow function. Unfortunately, when I compile in > telosb, it complaints "app.c:(.text+0x4486): undefined reference to > `pow'". And I find in the archive > <http://www.nabble.com/Regarding-pow-and-sqrt-td18204383.html> that this > could be solved by "using '-lm' compiler switch". How could I actually > do that to tell the compiler to link against math library? Thanks. > > > -Xiaohui > > > ------------------------------------------------------------------------ > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
