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.
Hello,
I am developing C++ code for a project on AM243x.
At some point I wanted to use mathlib/trig/ti_arm_trig.h. The problem is that I get linker errors e.g. [build] undefined first referenced
[build] symbol in file
[build] --------- ----------------
[build] ti_arm_sin(float) sensor/MyComponent.cpp.obj
The problem is that C++ is using name mangling and therefore the ti_arm_sin() cannot be resolved. In many other files of TI SDK there is correctly the following included#ifdef __cplusplus
extern "C" {
#endif
// ... code ...
#ifdef __cplusplus
}
#endif
Unfortunately in ti_arm_trig.h not. Is this by design? I fixed it in my code by usingextern "C"
{
#include <mathlib/trig/ti_arm_trig.h>
}
But it looks like it should be fixed in ti_arm_trig.h?
Kind regards
Dominik
Hi Dominik,
You are correct about the mathlib/trig/ti_arm_trig.h. It did miss the following:
#ifdef __cplusplus
extern "C" {
#endif
... ...
#ifdef __cplusplus
}
#endif
I will file a JIRA ticket for this issue. It should get fixed in next MCU+ SDK release.
Best regards,
Ming