<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Check the commands that are being sent to gcc and the linker to make sure that the -lm is being passed through properly.<div><br></div><div>It took me a heck of a long time to figure out exactly where to put the linker commands so that they actually got used. Mine is in my makefile.am and looks like:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">init_LDADD = -lm -ltelnetd</div></div><div><br></div><div>Your milage will vary though, I'm using a different setup from Chris Johns that just works.</div><div><br></div><div>Andrei</div><div><br></div><div><br><div><div>On 2011-January-13, at 6:24 PM, John Wood wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Clarification.<br><br>The code I wrote was in a file that I had added to rtems as a helper to a driver for calculating some coefficients.<br>It appears if the code is in my app it links but not if it is in the rtems code.<br><br>Thanks,<br>John<br><br>-----Original Message-----<br>From: <a href="mailto:rtems-users-bounces@rtems.org">rtems-users-bounces@rtems.org</a> [mailto:rtems-users-bounces@rtems.org] On Behalf Of John Wood<br>Sent: Thursday, January 13, 2011 8:16 PM<br>To: <a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>Subject: Trouble pulling in libm<br><br>Greetings all,<br><br>I am using rtems 4.9.2 on a Virtex 4 device with uses the 403 cpu.  I have written a some code that needs some of the libm functions but I get a linker error even with -lm passed to the linker.  I do not get an error indicating the library is not found.<br><br>Any suggestions?<br><br>Thanks,<br>John<br><br>_______________________________________________<br>rtems-users mailing list<br><a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br><a href="http://www.rtems.org/mailman/listinfo/rtems-users">http://www.rtems.org/mailman/listinfo/rtems-users</a><br><br>_______________________________________________<br>rtems-users mailing list<br>rtems-users@rtems.org<br>http://www.rtems.org/mailman/listinfo/rtems-users<br><br></div></blockquote></div><br>
<br></div></body></html>