Link errors

support for the ARM toolchain
Post Reply
Luis
Posts: 1
Joined: Sun Mar 28, 2010 9:34 am

Link errors

Post by Luis » Sun Mar 28, 2010 9:59 am

Hi all, I have a little problem when building some lib from source. I'm pretty new to the ARM toolchain and I'm sorry if this has been already solved somewhere, but I couldn't find anything when using the search.

I am following the instructions provided in the portlibs wiki page, and when calling make, I get some undefined reference errors, all to standard math functions, more precisely fabs, floor, sqrt, acos, log and log10. I'm on Windows and I'm using the MSys shell to do this. I don't get these undefined reference errors when using the Eclipse NDS builder plugin, so I don't have a clue what I'm doing wrong.

Any help will be greatly appreciated :)
Many thanks in advance

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Link errors

Post by WinterMute » Mon Mar 29, 2010 11:09 am

Those are math functions provided by libm, you need to add -lm to your link line. It's generally considered to be a bad idea using floating point code on the DS since it has no FPU and uses software emulation. Your mileage may vary, floats can be useful for quick prototyping and your application may not be sufficiently cpu heavy for floats to have a detrimental effect.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests