Why do I receive an "Error while obtaining sizes from MEX S-function. The specified module could not be found." error message?
24 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 22 Nov 2011
Modifié(e) : MathWorks Support Team
le 26 Août 2024
I am running a model with an S-Function built from blocks from the Signal Processing Blockset. The machine that I am running on does not have the Signal Proessing Blockset installed. I assumed once the S-Function is built the original library should not be needed.
However, I get the following error for my S-Function:
Error while obtaining sizes from MEX S-function 'TEST12_sf' in 'TEST12SF/RTW S-Function'.
MATLAB error message:
Invalid MEX-file 'C:\TEST12\TEST12_sf.mexw32': The specified module could not be found.
Why is this happening?
Réponse acceptée
MathWorks Support Team
le 23 Août 2024
Modifié(e) : MathWorks Support Team
le 26 Août 2024
This error typically occurs if the MEX-file references a runtime library, but Simulink cannot find the associated DLL file. Here are the steps to resolve this issue:
1. Move the DLL File
Place the missing DLL file to the same directory as the model or ensure it is on the Windows system path.
Specific scenario - DSP Library
For this scenario using the Signal Processing Blockset, copy the DSP shared library file "dsp_rt.dll" from $MATLABROOT/bin/win32 to the same directory on the target machine.
2. Identify the missing DLL
This error message does not specify which DLL file is missing. If it is not immediately obvious which other DLL files the MEX function needs, check the header files the S-function includes in its "#include" declarations.
If it is still unclear, load the MEX file in the dependency walker and look for libraries marked with a question mark in a yellow circle.
Dependency Walker can be downloaded from:
3. Rebuild the S-Function
Alternatively, you can rebuild the S-Function with a different Make command. To do this, navigate to "Simulation > Configuration Parameters > Real-Time Workshop", and set the "Make command" parameter to:
make_rtw OPT_OPTS="$(DEFAULT_OPT_OPTS) -DREBUILD_LIBRARIES"
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Block and Blockset Authoring dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!