Invalid MEX-file macOS

3 vues (au cours des 30 derniers jours)
Tine Skui
Tine Skui le 17 Oct 2023
Réponse apportée : Jinal le 23 Oct 2023
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)"

Réponses (1)

Jinal
Jinal le 23 Oct 2023
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.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by