- Verify if the model is properly configured for code generation.
- Review the limitations of code generation for referenced models at, https://www.mathworks.com/help/rtw/ug/code-generation-limitations-for-model-reference.html
- Check the code generation parameters in the configuration. You can access the code generation settings through the 'C Code' tab.
- Create 2 subsystems from which you can reference the models.
- If the issue persists, consider contacting MathWorks technical support at https://www.mathworks.com/support/contact_us.html
Codegeneration of a harness model with multiple referenced models using a library block/chart with exported functions causes build error function is already defined
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I have a model which contains 2 different referenced models. Both models refer to a library block/chart which has a graphical function on its top level. The graphical function is exported ('Export chart level functions'), but not globally visible.
When generating code with GRT, codegeneration is succesfull, but the build fails. It mentions the exported function is already defined in the other model, which is true.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/909850/image.png)
I would have expected because both models are in a harness, it would assign unique names to the exported functions, like it actually did to the header and source files. (ALM_Chk and ALM_Col).
How can I make sure there is a unique name generated for the exported functions in each referenced model to avoid a conflict during buildig?
Thank you in advance!
Kr,
Brecht
0 commentaires
Réponses (1)
Infinite_king
le 26 Mar 2024
Modifié(e) : Infinite_king
le 28 Mar 2024
Hi Karel Viaene,
I understand that your model is referencing 2 other models which uses the same library block. When attempting to generate the executable, the code is successfully generated but the project fails to build.
I suggest you follow the troubleshooting steps below:
0 commentaires
Voir également
Catégories
En savoir plus sur Deployment, Integration, and Supported Hardware dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!