Effacer les filtres
Effacer les filtres

Simulink Error: Invalid MEX-File <File Name>: the specified module could not be found when using newly generated library block

14 vues (au cours des 30 derniers jours)
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:
  5 commentaires
Chris Hack
Chris Hack le 29 Juil 2016
Results on my computer:
>> computer
ans =
PCWIN64
>> computer arch
ans =
win64
Results on his computer:
>> computer
ans =
PCWIN64
>> computer arch
ans =
win64
Mark McBroom
Mark McBroom le 24 Août 2016
Do your blocks link to other DLLs? If so make sure they are on Windows PATH.

Connectez-vous pour commenter.

Réponse acceptée

Chris Hack
Chris Hack le 2 Août 2016
So I was able to figure out the issue causing this particular problem. I had installed Microsoft Visual Studio 2015 and without any type of question or warning MATLAB decided to switch compilers from the Windows SDK V 7.1 to the Visual Studio 2015 compiler. Apparently, the Visual Studio 2015 and Visual Studio 2012 compilers are not compatible in a significant enough way to cause dependency errors when Simulink tries to run the .mexw64 files.
In order to debug the issue, we both ran the command
mex -setup
and compared the results. Thank you everyone for your help on this issue.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink Coder 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!

Translated by