header files

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

header files

3,335 次查看
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?
标签 (1)
0 项奖励
回复
1 回复

656 次查看
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 项奖励
回复