Invalid MEX-file macOS

3 ビュー (過去 30 日間)
Tine Skui
Tine Skui 2023 年 10 月 17 日
回答済み: Jinal 2023 年 10 月 23 日
I have been trying to run ValoMC (https://github.com/InverseLight/ValoMC/archive/master.zip) for Monte Carlo simulations in MATLAB, but can't run it. I have followed the installation guide and am using Xcode as compiler, but when trying to run the example files I get the error:
How can I fix this?
Note: I've tried entering otool -L libMatlabEngine.dylib in the terminal but then this comes up: "error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-classic: can't open file: libMatlabEngine.dylib (No such file or directory)"

回答 (1 件)

Jinal
Jinal 2023 年 10 月 23 日
Hello Tine,
As per my understanding, you are encountering errors while executing C++ MEX files on your macOS.
You can try the following workaround to resolve the issue you are facing:
Set the "DYLD_LIBRARY_PATH" environment variable to the path specified below:
‘matlabroot/extern/bin/maci64’
For more information on Run-Time Environment requirements for building C++ Engine programs, please refer the following link: https://www.mathworks.com/help/matlab/matlab_external/build-c-engine-programs.html#mw_4ec5bd7e-1127-41a8-844c-817cb7a9cae3
I hope that this helps resolve the issue you are facing.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by