As I recall, the math library on MSP430 supports has a fairly complete support for single precision variants of the math functions -- try using powf and sqrtf
Rob On Tue, Jan 27, 2009 at 3:24 PM, BAI LI <[email protected]> wrote: > HI, > > I was trying to use math.h file sitting in the MSP folder to run some sqrt > and pow functions. But once I include the file math.h it told me undefined > reference to sqrt and pow. The errors shown in the following: > > $ make telosb > mkdir -p build/telosb > compiling TestAesAppC to a telosb binary > ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -Wall -Wshadow > -Wnesc-all - > target=telosb -fnesc-cfile=build/telosb/app.c -board= > -DDEFINED_TOS_AM_GROUP=0x2 > 2 -DIDENT_APPNAME=\"TestAesAppC\" -DIDENT_USERNAME=\"EIT\" > -DIDENT_HOSTNAME=\"ws > n\" -DIDENT_USERHASH=0xa200ffadL -DIDENT_TIMESTAMP=0x497fa030L > -DIDENT_UIDHASH=0 > xb441b921L -I/opt/tinyos-2.x/tos/lib/printf TestAesAppC.nc -lm > /opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning > "*** L > OW POWER COMMUNICATIONS DISABLED ***" > /cygdrive/c/DOCUME~1/EIT/LOCALS~1/Temp/cc7jt2Gp.o: In function > `VirtualizeTimerC > $0$fireTimers': > app.c:(.text+0x1494): undefined reference to `pow' > make: *** [exe0] Error 1 > > So can anyone help me out? I searched the list. Sum1 said to use lm to link > the math library. How to do it properly? Like make telosb lm? It didnt' > work. Thanks in advance. > > Regards, > Bai > _______________________________________________ > 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
