mex -setup Fortran

조회 수: 27 (최근 30일)
Xin Tan
Xin Tan 2019년 7월 22일
댓글: Xin Tan 2019년 7월 26일
I am using Matlab on Mac and trying to compile some FORTRAN functions. I have installed gcc via brew install, and I have also found the gfortran file on /usr/local/bin/gfortran, but I when I run mex -setup FORTRAN, I always get the following error:
Error using mex
No supported compiler was found. For options, visit https://www.mathworks.com/support/compilers.
How shall I properly setup FORTRAN for mex on a Mac?

채택된 답변

jg614
jg614 2019년 7월 26일
MathWorks has disabled ("dropped support for") gfortran as a MEX compiler on Mac since R2015b, when the Intel Fortran compiler began to be supported.
To do this the supported way, you'll have to use a combination of the Intel Fortran compiler and Microsoft Visual Studio. Valid combinations are listed in the R2019a supported compilers document.
To do this the free way, you'll have to modify the MEX configuration XML files. See this discussion on how to do this.
  댓글 수: 1
Xin Tan
Xin Tan 2019년 7월 26일
Thanks! Intel compiler does help, but for some very old toolbox which uses extensively gfortran, the problem still exist. Later I figured out that rather than spending tons of time on configuration, making a linux virtual machine and running matlab on that would be more convenient and robust option.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by