How can I load the .dylib ?

6 views (last 30 days)
Safrul Lauparenta
Safrul Lauparenta on 13 Nov 2018
When I was running a script with matlab, I always encountered this error below:
dyld: Library not loaded: /usr/local/opt/gcc/lib/gcc/7/libgfortran.4.dylib
Referenced from: /home/3362876454/Desktop/Frac_Placement 2/./a.out
Reason: image not found
/bin/bash: line 1: 54844 Abort trap: 6 ./a.out < fort.5
./a.out<fort.5: Aborted
I have checked the directory and I found no such folder and subfolders name 'gcc/lib/gcc/7'
I did check the terminal and at the very least I was able to locate the gfortran directory and libgfortran.4.dylib. It is on /usr/local/brew/lib/gcc/7/libgfortran.4.dylib
I tried to manually copy the .dylib file to Matlab directory and it didnt work due to me not being the administrator of the machine (I was using my campus machine).
I am using Matlab R2017b in MacOS High Sierra. Is there any way to add the path of gfortran and its associated library to matlab?

Answers (0)

Categories

Find more on Search Path in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!