How do I generate C++ Code for a Simulink Model that is Callable from C?
6 views (last 30 days)
Show older comments
MathWorks Support Team
on 11 Aug 2017
Edited: MathWorks Support Team
on 30 Mar 2021
How do I generate C++ Code for a Simulink Model that is Callable from C?
Accepted Answer
MathWorks Support Team
on 30 Mar 2021
Edited: MathWorks Support Team
on 30 Mar 2021
See the following steps:
1. Set the 'Language' to 'C++' under the Code Generation Settings
2. Set the 'Code interface packaging' to 'Nonreusable function' under the Interface Settings (under the Code Generation Dropdown)
3. Generate code for the model
See the following link for an example of this, and the rest of the page for more examples regarding customization of generated code:
0 Comments
More Answers (0)
See Also
Categories
Find more on Simulink Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!