This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
我正在为 AM243x 上的一个项目开发 C++代码。
在某个时候、我想使用 mathlib/trig/ ti_arm_trig.h 。 问题是我遇到了链接器错误、例如 [build] undefined first referenced
[build] symbol in file
[build] --------- ----------------
[build] ti_arm_sin(float) sensor/MyComponent.cpp.obj
问题是 C++正在使用名称改编,因此 ti_arm_sin ()无法解决。 TI SDK 的许多其他文件中正确包含以下内容 #ifdef __cplusplus
extern "C" {
#endif
// ... code ...
#ifdef __cplusplus
}
#endif
很遗憾、在 ti_arm_trig.h 中没有。 这是根据设计吗? 我在代码中通过使用 extern "C"
{
#include <mathlib/trig/ti_arm_trig.h>
}
但它看起来应该在 ti_arm_trig.h 中被修复吗?
此致
多米尼克
尊敬的 Dominik:
您对 mathlib/trig/ti_arm_trig.h 的描述是正确的。 它确实错过了以下内容:
#ifdef _cplusplus
extern "C"{
#endif
...
#ifdef _cplusplus
}
#endif
我将为此问题提交 JIRA 票证。 该错误应在下一个 MCU+ SDK 版本中修复。
此致、
明