Invalid MEX-file macOS

17 次查看(过去 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 CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by