Code Generation using existing types

1 view (last 30 days)
Jeremy
Jeremy on 1 Mar 2014
I want to generate code from a model and use that code in an existing project. That project has some enums (all in C++) that we cannot change or alter. The model is a stateflow model that needs to use these enums. So if I define the enums to match exactly with the names in the existing code I will get a redefinition error from gcc.
So for now I am casting my generated enums to my code enums. But I know there is a way to simply tell matlab that I have existing enums and put the necessary #includes to use the existing enums in the generated code. These paths would have to be relative paths because the code will not be specific to any one machine.
Can anyone help with this?

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!