Unable to use round function

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

Unable to use round function

跳至解决方案
1,570 次查看
DemaQasem
Contributor II

Hello,

I am implementing a project on S32K144 using the S32DS IDE v3.4, when I use the "round" function and build the project I get the error  : 

DemaQasem_0-1707044718193.png

 

even though I made sure to include the math.h library
any reason for that  ?

Thank you.

标记 (2)
0 项奖励
回复
1 解答
1,541 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

math.h is only header file for math library. You need to add libm.a library into your project in project properties: 

jiri_kral_0-1707130775057.png

 

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,542 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

math.h is only header file for math library. You need to add libm.a library into your project in project properties: 

jiri_kral_0-1707130775057.png

 

0 项奖励
回复
863 次查看
rithic
Contributor II

Is there a similar solution for the imxrt1176 

I am getting a similar error this is the embedded coder window

rithic_0-1737554784335.png

 

The exact error from the diagnostic window

rithic_1-1737554842734.png

 

 

0 项奖励
回复
858 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

I'm not familiar with imxrt1176 and it's development tool, but the principle is very same. You need add math library and let the linker know where the library archive is (library path - if it is not already configured). 

0 项奖励
回复
1,508 次查看
DemaQasem
Contributor II
thank you so much ! it worked.
0 项奖励
回复