Why do I get "undefined reference" error when trying to generate code that references a C++ function?
显示 更早的评论
I am trying to include a C++ function in my MATLAB code for code generation, and I have included the following lines, where the function "func" is defined in "function.h".
coder.cinclude('function.h');
coder.ceval('func');
However, I am getting an error:
undefined reference to `func'
Why does this happen, and how can I resolve this?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!