invalid mex file and missing libmwblas.dylib error

14 visualizzazioni (ultimi 30 giorni)
I am compiling a MATLAB script on mac and i have downloaded Xcode for MEX file integration but I am getting the following error related to some missing libraries:
Invalid MEX-file '/Users/haneya/Desktop/SVT_MostRecent/private/XonOmega.mexmaci64':
dlopen(/Users/haneya/Desktop/SVT_MostRecent/private/XonOmega.mexmaci64, 6): Library not
loaded: @loader_path/libmwblas.dylib
Referenced from: /Users/haneya/Desktop/SVT_MostRecent/private/XonOmega.mexmaci64
Reason: image not found.
  9 Commenti
Samuel L. Polk
Samuel L. Polk il 6 Mag 2021
@Walter Roberson Thank you for your quick response! Unfortunately, I'm having some trouble finding the folder '/user/lib/' in the package contents of the MATLAB software. Could you please describe where that folder is? I am runnning MATLAB R2021a on macOS Big Sur Version 11.2.3 if that is any help. Thank you again for your help.
Walter Roberson
Walter Roberson il 7 Mag 2021
It was /usr/lib not /user/lib . And it is not inside the MATLAB software, it is a system folder that exists on systems derived from Unix.
!ls /usr/lib
apt dconf gettext groff libgdiplus.so libMonoPosixHelper.so modules-load.d pkg-config.multiarch sasl2 systemd X11 binfmt.d debug girepository-1.0 initramfs-tools libgdiplus.so.0 libMonoSupportW.so mono python2.7 sftp-server tar x86_64-linux-gnu binfmt-support dpkg glib-networking insserv libgdiplus.so.0.0.0 locale openssh python3 software-properties tc xorg cli esmtp gnupg jvm libid3tag.so.0 man-db os-release python3.5 ssl tmpfiles.d compat-ld gcc gold-ld ldscripts libid3tag.so.0.3.0 mime pkgconfig python3.8 syslog-ng valgrind
However:

Accedi per commentare.

Risposte (1)

Omar Shadeed
Omar Shadeed il 24 Apr 2019
Hi Haneya,
I'm actually having the same error, I copied the libmwblas.dylib file from matlabroot and pasted it in my current matlab directory but I still get the same error.
Note: The mex is done successfully but when I run the Simulinknk model that uses the S-Function I get the same error you got. So what did you do to make it work?
Thanks,
The error I get is:
  • Error while obtaining sizes from MEX S-function 'TrackerObject' in 'DSSDK_TrackerSingleObject/S-Function'.
  • Caused by:
  • Invalid MEX-file '/Users/omarshadeed/Desktop/VICON/Simulink models/DSSDK/SingleObject/TrackerObject.mexmaci64': dlopen(/Users/omarshadeed/Desktop/VICON/Simulink models/DSSDK/SingleObject/TrackerObject.mexmaci64, 6): Library not loaded: @executable_path/libViconDataStreamSDK_CPP.dylib Referenced from: /Users/omarshadeed/Desktop/VICON/Simulink models/DSSDK/SingleObject/TrackerObject.mexmaci64 Reason: image not found.

Categorie

Scopri di più su Write C Functions Callable from MATLAB (MEX Files) in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by