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

9 ビュー (過去 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 Center および File ExchangeSimulink Coder についてさらに検索

タグ

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by