Math function

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

Math function

1,109 次查看
Teckna
Contributor V

Hi folks,

 

I'm using CW10.2, MQX 3.8.1 amd a custom board with K60.

 

In one of source files I have the following statements:

 

#include <math.h>

 

float a, b, c;

 

...

 

a = powf( b, c );

 

When I build the project, the compiler gives me the error "function has no prototype" on that line. If I use pow function instead of powf function, no error comes.

Is there some settings I must do or some include file I'm missing?

 

Many thanks

Teckna

 

Upgrade:

If I enable the "Require function prototypes" flag, the error is present, but if I disable it, the error is not present: maybe there is a missing declaration in the include file?

 

Teckna

标签 (1)
0 项奖励
回复
1 回复

831 次查看
Phil_D1
Contributor III

I see the exact same issue with CW10.2, MQX 3.8.1 and a custom board with PX microcontroller. I installed CW10.3, but that didn't help. So far, I haven't found CW10's compiler error messages very helpful at describing what the actual problem is.

Phil

0 项奖励
回复