<div dir="ltr">hi,<div><br></div><div style>I want to use math function in rtems, and add such a function:</div><div style><div> 77 int test(float a)</div><div> 78 {</div><div> 79 int b= floor(a);</div><div> 80 return b;</div>
<div> 81 }</div><div style>When compiling, it tells 'undefined reference to `floor'</div><div style>collect2: error: ld returned 1 exit status'</div><div style><br></div><div style>I do not know how to resolve this. I tried to pass `-lm` to gcc, but still failed to link.</div>
<div style><br></div><div style>Thanks,</div><div style>Peng. </div></div></div>