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 Kommentar

Clare
Clare am 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

Melden Sie sich an, um zu kommentieren.

Antworten (1)

James Tursa
James Tursa am 12 Aug. 2013

0 Stimmen

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 Kommentar

Clare
Clare am 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

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Fortran with MATLAB finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 12 Aug. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by