Trigonometric functions in CodeWarrior

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trigonometric functions in CodeWarrior

1,039 Views
lukashrecko
Contributor I

Hello,

I have problem with trigonometric functions on MPC5604B board.

I've found something on this link http://cache.freescale.com/files/soft_dev_tools/doc/ref_manual/EWL_C_Reference.pdf , but it don't work.

Can you help me?

My code:

#include <math.h>

#define PI 3.14159

void COSINE(uint16_t angle){

  double radians;

  double value;

  radians = angle/180*PI;

  value = acos(radians);

}

Output:

Link Error   : undefined: 'acos'

Referenced from 'COSINE' in track.o

Link failed.

0 Kudos
1 Reply

367 Views
RichardBalogh_n
Contributor II

Seems  that linker is unable to find right library files. Try following: in Properties / Settings in the Librarian panel, you can select a library model from a pre-defined list of models. Also try:

The Enable automatic library configuration checkbox in the Librarian panel, determines whether or

not the EWL mechanism of library selection will be used by the build tools (compiler and linker). When

this checkbox is not checked, you need to manually add the required library files to the project.

You can select the relevant library files by choosing the correct architecture (CF v1, v2-4) and specifying

whether or not FPU and PIC/PID is used in the Project -> Properties -> C/C++ Build -> Settings ->

ColdFire Compiler -> Processor panel.


0 Kudos