Hi,
I'm having trouble compiling a code that uses a Fortran script via the mex feature.
I'm running MATLAB R2014A on MAC 10.9.4.
Based on suggestions, I've done the following:
1. change location of mexopt.sh home/.Matlab2014a
2. on mexopt.sh, change all SDK pointers 10.8 to 10.9 and the rest will be 10.6
3. Go to Applications/MATLAB_R2014a.app/sys/os/maci64
renamed the file (just to save it)
mv libgfortran.3.dylib libgfortran.3.dylib.old
4. create the symbolic link
ln -s /usr/local/lib/libgfortran.3.dylib libgfortran.3.dylib
Now, I get the following results
When I try to run the code--
Caught "std::exception" Exception message is:
FatalException(unknown)
MATLAB:dispatcher:loadLibrary Can't load '/Applications/MATLAB_R2014a.app/bin/maci64/libmwmathlinalg.dylib': dlopen(/Applications/MATLAB_R2014a.app/bin/maci64/libmwmathlinalg.dylib, 10): Library not loaded: @loader_path/../../sys/os/maci64/libgfortran.3.dylib
Referenced from: /Applications/MATLAB_R2014a.app/bin/maci64/libmwma57.dylib
Reason: image not found.
When I type mex -setup and click FORTRAN I get--
Error using mex
No supported compiler or SDK was found. For options, visit
http://www.mathworks.com/support/compilers/R2014a/maci64.
When I type gcc -version in Terminal, I get:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
This stuff is a little bit outside my area of expertise, so I'd appreciate any insight.