Using mex files with Fortran 90

2 views (last 30 days)
Clare
Clare on 12 Aug 2013
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 Comment
Clare
Clare on 12 Aug 2013
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

Sign in to comment.

Answers (1)

James Tursa
James Tursa on 12 Aug 2013
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 Comment
Clare
Clare on 12 Aug 2013
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

Sign in to comment.

Categories

Find more on Fortran with MATLAB 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!