![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1503559/image.png)
How do I prevent including ert_main.cpp in my code generation report?
5 次查看(过去 30 天)
显示 更早的评论
We used the ert.tlc to generate the C++ code with the custom target. Instead of using ert_main as our main method, we used the post code generation command parameter to generate a new one. I wonder if it's possible to modify some info files, such as traceInfo.mat or buildInfo.mat, to prevent collecting the ert_main.cpp into the report generation. Or is it possible to modify the generation of ert_main.cpp directly using our customized tlc file?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/891260/image.png)
0 个评论
回答(1 个)
Aiswarya
2023-10-6
Hi,
I understand that you want to prevent including the ert_main.cpp file in your code generation report. This can be done by modifying the Configuration Parameters in Model Settings. You can navigate to Code Generation > Templates > Custom Templates. In that section, uncheck the option Generate an example main program. This prevents the collection of ert_main.cpp in your code generation report. The ert_main.cpp will not show up in the main file section of the report. In fact, it is recommended to disable this option if you want to create a custom main program:
The image below shows the corresponding option in the Configuration Parameters window.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1503559/image.png)
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!