undefined reference to `floor`
Peng Fan
van.freenix at gmail.com
Mon Sep 16 10:25:58 UTC 2013
hi,
I want to use math function in rtems, and add such a function:
77 int test(float a)
78 {
79 int b= floor(a);
80 return b;
81 }
When compiling, it tells 'undefined reference to `floor'
collect2: error: ld returned 1 exit status'
I do not know how to resolve this. I tried to pass `-lm` to gcc, but still
failed to link.
Thanks,
Peng.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20130916/ffab7ac2/attachment.html>
More information about the users
mailing list