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.