Trouble pulling in libm
Andrei Chichak
groups at chichak.ca
Fri Jan 14 04:42:34 UTC 2011
Check the commands that are being sent to gcc and the linker to make sure that the -lm is being passed through properly.
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:
init_LDADD = -lm -ltelnetd
Your milage will vary though, I'm using a different setup from Chris Johns that just works.
Andrei
On 2011-January-13, at 6:24 PM, John Wood wrote:
> Clarification.
>
> The code I wrote was in a file that I had added to rtems as a helper to a driver for calculating some coefficients.
> It appears if the code is in my app it links but not if it is in the rtems code.
>
> Thanks,
> John
>
> -----Original Message-----
> From: rtems-users-bounces at rtems.org [mailto:rtems-users-bounces at rtems.org] On Behalf Of John Wood
> Sent: Thursday, January 13, 2011 8:16 PM
> To: rtems-users at rtems.org
> Subject: Trouble pulling in libm
>
> Greetings all,
>
> 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.
>
> Any suggestions?
>
> Thanks,
> John
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20110113/815616ad/attachment-0001.html>
More information about the users
mailing list