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.

MCU-PLUS-SDK-AM243X: C++ and ti_arm_trig.h, unresolved symbols, name mangling

Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: MATHLIB

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 using

extern "C"
{
#include <mathlib/trig/ti_arm_trig.h>
}

But it looks like it should be fixed in ti_arm_trig.h?

Kind regards

Dominik