Undefined Reference to pow()
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2010-01-12 12:23 AM
Posted on January 12, 2010 at 09:23
Undefined Reference to pow()
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-05-17 4:37 AM
Posted on May 17, 2011 at 13:37
Hi all,
I try to calculate some values using the STM32F103VET6 under a Linux development environment using the toolchain version arm-2008q1 and I cannot use the function pow(). return pow((4.0f * (6.4f / 4.0f)), ((float)value / 127.0f)); I have included math.h and I tried to link against libm.a but the lib is really not existend. I can find three different libm.a on my system: /opt/arm-2008q1/arm-none-linux-gnueabi/libc/armv4t/usr/lib/libm.a /opt/arm-2008q1/arm-none-linux-gnueabi/libc/thumb2/usr/lib/libm.a /opt/arm-2008q1/arm-none-linux-gnueabi/libc/usr/lib/libm.a But none of them (I would never have guessed) links against my program. make stalls with ''Segmentation fault'' in each case because the processor types don't match. Where can I get the libm for my processor? Do I need a different toolchain? Thanks in advance! Timo