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

조회 수: 3 (최근 30일)
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?

채택된 답변

Benjamin Thompson
Benjamin Thompson 2024년 9월 13일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by