Simulink Error: Invalid MEX-File <File Name>: the specified module could not be found when using newly generated library block
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Chris Hack
am 26 Jul. 2016
Kommentiert: Mark McBroom
am 24 Aug. 2016
Hi,
I have read all of the posts I can find regarding this error and have as of yet been unable to find a solution to the problem. Recently, I generated two new library blocks (using r2016a) for a custom library that we have for what will become our new flagship product. Until now, we have had no problems with this and I changed absolutely nothing in the process of generating the associated S-Functions from what I had done with the other blocks in the library. I tested everything and it all works wonderfully on my machine, however when I distribute the new files to my associate for use in our state machine (Simulink/Stateflow), he cannot get the model to simulate. He gets the following error:
Error while obtaining sizes from MEX S-function 'sfun_Write_UL_To_LCD' in 'VN_LTE/LCD_Display/LCD_Update/Display Underscores/S-Function'.
Caused by:
· Invalid MEX-file 'C:\CubbyMyDocuments\Code ARM\MATLAB\EFM ARM Libraries\MATLAB code\MLibraries\LCD\sfun_Write_UL_To_LCD.mexw64': The specified module could not be found.
As suggested in another post, I have used the dependency viewer on both of our machines and there is a glaring difference on his machine in that a lot of the dependencies can't be found. (See attached screen shot of dependency viewer from his machine).
The confusion is that since nothing has changed on my end in generating the .mexw64 files and supposedly nothing has changed on his end executing the files, why do all of the previous blocks function correctly and only these new ones generate an issue?
The process I go through for making the blocks is as follows:
1. Use the S-Function builder to generate all of the necessary files to call a custom written C function.
2. Create subsystem in the associated library which simply uses the newly generated S-Function.
3. Distribute all generated files (with the exception of the SFB*.mat files) and the library which uses them.
Simple.
As always, thanks in advance for your help. Here is the screen shot of his dependency viewer:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155154/image.png)
5 Kommentare
Mark McBroom
am 24 Aug. 2016
Do your blocks link to other DLLs? If so make sure they are on Windows PATH.
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!