cancel
Showing results for 
Search instead for 
Did you mean: 

Undefined Reference to pow()

timo
Associate
Posted on January 12, 2010 at 09:23

Undefined Reference to pow()

1 REPLY 1
timo
Associate
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