header files

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

header files

3,085 Views
lssuer
Contributor I
Im trying to do floating point arithmetic with codewarrior and im not sure what header files are needed. can anyone help with this?
Labels (1)
0 Kudos
Reply
1 Reply

406 Views
CompilerGuru
NXP Employee
NXP Employee
There are no header files needed to do floating point arithmetic.

Of course, if you are calling certain functions, like sin, include the header declaring this function, for sin:

#include <math.h>

However if your code is just using arithmetic operations like addition or multiplications, then no additional headers are necessary.

The most common problem of why floating point arithmetic does not work is because the wrong libraries are linked or because the wrong compiler options are specified. Try to create a new project with the wizard and have a look for the one page where the wizard does explicitely ask for the floating point support. The default it not to support floating point, so you have to enable it there.
0 Kudos
Reply