Stateflow use custom C code, while generating C++ using Embedded coder
Show older comments
Hi, I'm using Stateflow inside simulink. I used some C functions as custom code using this article, and also I want to generate a C++ code based on my model and chart using Embedded Coder. The code generates fine, but it can not be compiled because of undefined reference linker error.
After some investigation, I found that there is no extern "C" guard for C header related to custom code in the C++ header of the generated code. After I added extern manually, linker error fixed.
My question, is about some configs or checkbox to use and having C custom code, while generating C++ code (embedded coder).
thanks
Accepted Answer
More Answers (0)
Categories
Find more on Simulink 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!