When using mex files, cannot find libraries
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
jh2011
am 9 Jan. 2018
Beantwortet: Walter Roberson
am 9 Jan. 2018
I created a mex function which uses another library that relies on gfortran. However, when I execute the function, I see this error message
Library not loaded: /usr/local/lib/libgfortran.1.dylib
I do have this library, but it's just in a different folder called /usr/local/gfortran/lib, so I did this to fix the issue
setenv('DYLD_LIBRARY_PATH', '/usr/local/gfortran/lib');
This doesn't fix it at all. I still see the same issue. Is there a way to force the library to look for gfortran in this specific path that I specified?
2 Kommentare
Walter Roberson
am 9 Jan. 2018
Which operating system are you using, and which release? DYLD_LIBRARY_PATH suggests OS-X or MacOS, but there were security changes to how DYLD_LIBRARY_PATH is processed in recent Apple releases.
Akzeptierte Antwort
Walter Roberson
am 9 Jan. 2018
With MacOS Sierra, you are affected to Apple's changes to disable most uses of DYLD_LIBRARY_PATH . See https://github.com/nteract/nteract/issues/1523
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!