Simulink crashes when running MEX functions created with Visual Studio 2022 17.10.4

8 visualizaciones (últimos 30 días)
We have been running MATLAB R2023B Update 7 with Simulink models using S-Functions built with VS 2022 17.9.0. When we updated to VS 2022 17.10.4 we starting having MATLAB crashes as soon as Simulink starts executing models with these MEX functions. Is this a known issue, and do we know if moving to Update 8 or 9 will fix it?

Respuesta aceptada

Benjamin Thompson
Benjamin Thompson el 13 de Sept. de 2024
I guess I can answer my own question with some help from an older post and some great help from the MATLAB support team.
MATLAB R2023B Update 7 through 9 are delivered with a version of MSVP140 DLLs that is not compatible with a change in MSVCP runtime that happened sometime after the 17.9.0 release and the 17.10.4 release, not sure exactly when. This can be fixed after installing VS 2022 17.10.4 or later (MSVC runtime 14.40.x) if you go to the Windows\System32 folder and copy all the MSVCP140 DLLs (there are maybe 5 of them depending on the VS 2022 package options you chose) to the MATLAB bin\win64 folder.
If using the MATLAB runtime, do the same thing in the MATLAB Runtime\R2023B\...not sure...\bin\win64 folder. But don't go replacing every copy of those DLLs you can find because applications or certain parts of MATLAB may truly depend on the older runtime version.

Más respuestas (0)

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by