Hai....
         I'm working in telosb....When i am using math.h in my application,i
got error like Undefined reference to pow ..How to fix this problem.....Plz
explain it in detail.........
Manjunath Doddavenkatappa wrote:
> 
> 
> Hi,
> 
>    Can you please try sqrtf() ?
> 
> Manjunath D
> 
> ################################################################################################################
> ***************************************************************************************************************
> 
> On Wed, 16 Nov 2011, [email protected] wrote:
> 
>>
>> Hello,
>>
>> I'm working with telosb mote, and I need to use sqrt function in my
>> program, but I can't compile it.
>>
>> ===========================================
>> mkdir -p build/telosb
>>    compiling TestMulAppC 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=0x22 -DIDENT_APPNAME=\"TestMulAppC\"
>> -DIDENT_USERNAME=\"xubuntos\" -DIDENT_HOSTNAME=\"xubuntos-tinyos\"
>> -DIDENT_USERHASH=0x00f95284L -DIDENT_TIMESTAMP=0x4ec2f4a5L
>> -DIDENT_UIDHASH=0xb186c6f2L  TestMulAppC.nc -lm <---- LM here
>> !!!!!!!!!!!!
>> TestMulC.nc: In function `TestMulC$Boot$booted':
>> TestMulC.nc:22: warning: unused variable `m'
>> /tmp/ccIJqAuN.o: In function `EllipticCurveP$mtIsPrime':
>> app.c:(.text+0x6c0): undefined reference to `sqrt'
>> make: *** [exe0] Error 1
>> ===========================================
>>
>> I have included math.h in my program, and I've noticed that the -lm
>> switch
>> is turned on, and I have even found the function declaration at ligne 62
>> in file /usr/msp430/include/math.h
>>
>> ===========================================
>> extern double sqrt _PARAMS((double));
>> ===========================================
>>
>> I don't understand why it cannot find sqrt function.
>>
>> So can anyone help me out?
>>
>> Best regards
>>
>> -- 
>> Yanbo SHOU
>> Ph.D student Cartoon Team
>> Computer Science Laboratory of Franche-Comté
>> Office 420C
>> 16 route de Gray
>> 25 000 Besançon, France
>>
>> _______________________________________________
>> 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
> 

-- 
View this message in context: 
http://old.nabble.com/undefined-reference-to-%60sqrt%27-tp32851479p32880286.html
Sent from the TinyOS - Help mailing list archive at Nabble.com.


_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to