C++ code generation: is it possible to put struct declaration in a namespace?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
I am generating C++ code using Embedded Coder in v2021b. I am able to put the generated class in my chosen namespace via the Code Interface dialog:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1139860/image.png)
But in my model i am using various buses, which are translated in C++ structs, which in turn reside in the global namespace.
Is there a way to specify a namespace for these structs too?
0 Commenti
Risposte (1)
Yoga
il 10 Set 2023
I understand that you want to specify a namespace for structs that result out of the various buses you use in the model. This is possible by interactively configuring the C++ resultant code.
Please refer to the following link - https://www.mathworks.com/help/ecoder/ug/interactively-configure-cpp-interface.html.
I hope this helps resolve your issue.
Vedere anche
Categorie
Scopri di più su Deployment, Integration, and Supported Hardware in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!