フィルターのクリア

How to namespace the C++ code from simulink embedded coder

8 ビュー (過去 30 日間)
Ian Colwell
Ian Colwell 2022 年 11 月 21 日
コメント済み: Ian Colwell 2022 年 12 月 12 日
Hello There,
We have several simulink models that we export using embedded coder and compile together to create 1 app.
How do we get embedded coder to generate C++ code that is namespaced? It seems like matlab coder and even embedded coder for m files have this feature, but not embedded coder for simulink.
The issue is that the generated code will create globals like "rtConstP" that will conflict with each other once compiled together.

採用された回答

Mark McBroom
Mark McBroom 2022 年 12 月 9 日
https://www.mathworks.com/help/ecoder/ug/interactively-configure-cpp-interface.html
  1 件のコメント
Ian Colwell
Ian Colwell 2022 年 12 月 12 日
Thanks Mark! Somehow I never came across that page in all my searching. This is definitely the best option for customizing and namespacing exported code.
Unfortunately it seems we are unable to use C++ class export since it's incompatible with variable-size input signals to the model. Regardless, this answers the original question.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by