公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

如何在PSoC® Creator™中为PSoC 4或PSoC 5LP GCC编译器使用数学函数 - Community Translated (ZH)

如何在PSoC® Creator™中为PSoC 4或PSoC 5LP GCC编译器使用数学函数 - Community Translated (ZH)

ChaitanyaV_61
Employee
Employee
50 questions asked 25 likes received 25 sign-ins

Community Translated by : kama_1693131

Version: **

问题如何在PSoC® Creator™ 3.0PSoC 4PSoC 5LP GCC编译器使用数学函

解答

要在PSoC® Creator™中使用数学函数(例如sqrtpow),按照下列步操作:

  1. 点击Project
  2. 点击Build Settings
  3. ARM GCC 4.7.3下打开Linker设置然后单击General
  4. Additional Libraries后添加m

1显示了此过程

 

1.添加数学Math

pastedImage_6.png

如果未添加此额外库(Additional library,在试图使用数学函数的情况下会导致构建错误 "undefined reference to sqrt"(此处sqrt是数学函数)。

0 点赞
325 次查看