[Contiki-developers] log function and cooja

114 views
Skip to first unread message

Lyuba Pranchova

unread,
Jun 3, 2009, 2:55:16 PM6/3/09
to Contiki developer mailing list
Hi!

I'm having a problem with the math.h library when I'm trying to use it in Instant Contiki. When I'm trying to use the log(x) function the Cooja simulator gives an error message. I checked and everywhere it says that the log function is defined in math.h. So I don't know where is the problem and how can I fix it. I would be grateful if you could help me!

Thank's in advance!

Best regards,

Lyuba Pranchova

Nicolas Tsiftes

unread,
Jun 3, 2009, 3:20:19 PM6/3/09
to Contiki developer mailing list
Lyuba Pranchova skrev:

Hello,

It appears that log() isn't included in libm, but logf() is. You can
link libm with your code by adding

TARGET_LIBFILES+=-lm

to your build command.

Nicolas

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Contiki-developers mailing list
Contiki-d...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/contiki-developers

Lyuba Pranchova

unread,
Jun 3, 2009, 4:34:16 PM6/3/09
to Contiki developer mailing list
Hi!

Thank you very much, hope it'll work out this time.

Regards,

Lyuba
Reply all
Reply to author
Forward
0 new messages