how to use powf or ceilingf function in rtems..

Joel Sherrill joel at rtems.org
Sat Nov 12 14:37:07 UTC 2016


On Nov 12, 2016 4:44 AM, "김찬" <ckim at etri.re.kr> wrote:
>
> Hello,
>
> I’m trying to make an rtems application which uses some math function.
>
> I put #include <math.h>. When the powf function is in the Init()
function, it works,
>
> But when powf is called from another function(I want to call this
function from Init..), I get ‘undefined reference to powf’ error.
>
> I tried merning the files into one but it is the same. What can be the
problem?

You should only have to include math.h and link against libm. There should
be nothing odd.

My first guess is that the -lm argument is before the other .o on the link
command.

Check that and if that isn't it, can you produce an example?

> Thanks!
>
> Chan Kim
>
>
>
> 김 찬 (Chan Kim)
>
> 책임연구원, 프로세서연구실, 지능형반도체연구부
>
> 한국전자통신연구원
>
> O) 042-860-5773  C) 010-3418-9152  E) ckim at etri.re.kr
>
>
>
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20161112/0230790c/attachment-0002.html>


More information about the users mailing list