フィルターのクリア

Problem using loadlibrary in R2023B Update 7 and VS 2022 v17.9

8 ビュー (過去 30 日間)
Benjamin Thompson
Benjamin Thompson 2024 年 5 月 21 日
回答済み: Benjamin Thompson 2024 年 5 月 28 日
I just updated my VS 2022 Enterprise from version 17.8 to 17.9.0 and I am having a problem using loadlibrary. It cannot find C header files and runtime libraries, possibly due to 17.9 shipping with a new MSVC version 14.39.33519 instead of the 14.38 version that comes with 17.8. How do I retarget loadlibrary to use the new version?
  2 件のコメント
Benjamin Thompson
Benjamin Thompson 2024 年 5 月 21 日
So if you run mex -setup and click on the Visual C++ 2022 link, nothing seems to happen if you had already setup mex with VS 2022. But then you have a problem if you upgrade VS 2022, how do you get mex to update its path information?

サインインしてコメントする。

採用された回答

Benjamin Thompson
Benjamin Thompson 2024 年 5 月 28 日
I found that this works, and confirmed with Mathworks support that it is a recommended workaround for the situation where you update Visual Studio and the mex tool cannot detect that path changes are necessary. The command "prefdir' in MATLAB will give you the path name for where MATLAB stores these preferences. Go there and delete the mex_C*.xml files. Then run "mex -setup C" and "mex -setup C++" again to regenerate those XML files.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWrite C Functions Callable from MATLAB (MEX Files) についてさらに検索

タグ

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by