Why do I get "undefined reference" error when trying to generate code that references a C++ function?
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!