Problem with eclipse and atan

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

rafix
Posts: 4
Joined: Sat May 25, 2013 10:15 am

Problem with eclipse and atan

Postby rafix » Sat May 25, 2013 10:22 am

Hi all,

i'm using eclipse to make some simple projects with a stm32f303 discovery.
i want to use the atan function or something similar but when i include math.h and use atan, i have the following error:

/home/myName/workspaceChibios/CompassTest//main.c:184: undefined reference to `atan'

I have read about using -lm or add an "m" into libraries, but i cant to that by project property.

Any ideas?

Thanks

Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm
Location: India

Re: Problem with eclipse and atan

Postby Abhishek » Sat May 25, 2013 10:30 am

I suppose you are using Eclipse with linux, and you are using the ChibiOS makefiles, right?

You should add '-lm' to the makefile to the DLIBS section of the Makefile. It should work then.

rafix
Posts: 4
Joined: Sat May 25, 2013 10:15 am

Re: Problem with eclipse and atan

Postby rafix » Sat May 25, 2013 10:38 am

THANK YOU !

fast and effective :D


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 53 guests