Using mex files with Fortran 90

I can't seem to find specific information about my platforms. I am trying to read .f90 files via mex files. I am running 2011a on a Macintosh and 2013a on Linux. In the mexopts.sh file, what changes should I make to allow .f90 files? Thanks for any help on this confusing issue.

댓글 수: 1

Clare
Clare 2013년 8월 12일
I'm getting the following error when trying to run the examples:
/Applications/MATLAB_R2011a_Student.app/bin/mex: line 305: gcc-4.2: command not found /Applications/MATLAB_R2011a_Student.app/bin/mex: line 1041: gfortran: command not found
I'm thinking I need to use this path to find the right library: /usr/local/gfortran/lib/gcc/x86_64-apple-darwin11/4.6.2 But inside 4.6.2, I can't decide which is the correct library. i386 is an option

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

답변 (1개)

James Tursa
James Tursa 2013년 8월 12일

0 개 추천

Not sure what the options files look like on a Mac, but if you see a /fixed option on the COMPFLAGS line, get rid of it. That is the only thing I had to do to get .f90 files to compile on Windows.

댓글 수: 1

Clare
Clare 2013년 8월 12일
I read about that, and looked for the COMPFLAGS line, but couldn't find it. I think that is supposed to be in the mexopts.bat file, and all I seem to have is mexopts.sh

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

카테고리

도움말 센터File Exchange에서 Fortran with MATLAB에 대해 자세히 알아보기

태그

질문:

2013년 8월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by