math.h not working on Ubuntu distribution

Hi to everybody.

I’m a new beaglebone user. I’m using the Ubuntu Robert C Nelson image (http://elinux.org/BeagleBoardDebian#eMMC:_BeagleBone_Black).

I’m trying to uses the math.h library, atan(), asin() and cos() functions. But these function doesn’t work on my beaglebone. I’m using the arm-none-linux-gnueabi crosscompiling tool. I saw that I must include the -lm option to linking the executable with the library. I have not any compiling error neither warning, but the functions listed above doesn’t work, they return wrong results.

Anyone can help me. How could I make work the math.h library work on the beaglebone under ubuntu distribution.

Regards.

Hi to everybody.

I'm a new beaglebone user. I'm using the Ubuntu Robert C Nelson image
(BeagleBoardDebian - eLinux.org).

I'm trying to uses the math.h library, atan(), asin() and cos() functions.
But these function doesn't work on my beaglebone. I'm using the
arm-none-linux-gnueabi crosscompiling tool. I saw that I must include the

Use "arm-none-linux-gnueabihf" on a armhf system.

-lm option to linking the executable with the library. I have not any
compiling error neither warning, but the functions listed above doesn't
work, they return wrong results.

Anyone can help me. How could I make work the math.h library work on the
beaglebone under ubuntu distribution.

You can also install "build-essential" on the beaglebone

Regards,

Thanks Robert,

I have used the “arm-none-linux-gnueabihf” compiler, and it works fine!

Fran.