The problem occurred when creating an accelerated MEX file for the model 'ActiveSupport_3DFIG'.
Show older comments
MATLAB only gave the reason as: encountered an error while compiling "ActiveSupport_3DFIG_acc".
Answers (1)
Subhajyoti
on 7 Aug 2024
0 votes
Hi Zhurui,
I was also facing a similar error message when compiling my model.
After thoroughly reviewing the documentation, I found the following links helpful in debugging my model and resolving the issue.
- Debug C MEX S-Functions: https://www.mathworks.com/help/simulink/sfg/debugging-c-mex-s-functions.html
- Manage Simulation Targets for Referenced Models: https://www.mathworks.com/help/simulink/ug/model-reference-simulation-targets-1.html
- C MEX S-Function Examples: https://www.mathworks.com/help/simulink/sfg/c-mex-s-function-examples.html
The explanation and examples here provided clear guidance for step-by-step troubleshooting to pinpoint the exact cause.
You may go through the following MathWorks documentation links to learn more about using MEX Functions:
- Simulink Engine Interaction with C S-Functions: https://www.mathworks.com/help/simulink/sfg/how-the-simulink-engine-interacts-with-c-s-functions.html
- Available S-Function Implementations: https://www.mathworks.com/help/simulink/sfg/available-s-function-implementations.html
- Accelerate MATLAB Algorithm by Generating MEX Function: https://www.mathworks.com/help/coder/gs/generating-mex-functions-from-matlab-code-at-the-command-line.html
- Workflow for Accelerating MATLAB Algorithms: https://www.mathworks.com/help/coder/ug/workflow-for-accelerating-matlab-algorithms.html
Also, the following are some helpful resources you can refer to for accelerating your simulation:
- Best Practices for Using MEX Functions to Accelerate MATLAB Algorithm: https://www.mathworks.com/help/coder/ug/best-practices-for-using-mex-functions-to-accelerate-matlab-algorithms.html
- Share Simulink Cache Files for Faster Simulation: https://www.mathworks.com/help/simulink/ug/reuse-simulation-builds-for-faster-simulations.html
- Reduce Update Time for Referenced Models by Using Parallel Builds: https://www.mathworks.com/help/simulink/ug/referenced-model-parallel-builds.html
I hope this helps.
Categories
Find more on MATLAB Compiler 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!