Azzera filtri
Azzera filtri

Linux gfortran no supported compiler

3 visualizzazioni (ultimi 30 giorni)
Ken
Ken il 16 Mar 2017
Modificato: Zain il 10 Set 2018
I am attempting to generate a simple mex file for a fortran file. For example, compiling timestwo.f using mex. This is the output that I receive:
INPUT:
mex -v timestwo.f
OUTPUT:
Neither -compatibleArrayDims nor -largeArrayDims is selected.
Using -compatibleArrayDims. In the future, MATLAB will require the use of
-largeArrayDims and remove the -compatibleArrayDims option.
For more information:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
No MEX options file identified; looking for an implicit selection.
... Looking for compiler 'gfortran' ...
... Executing command 'which gfortran' ...Yes ('/usr/bin/gfortran').
... Looking for folder '/usr/bin' ...Yes.
... Executing command 'which gfortran' ...Yes ('/usr/bin/gfortran').
... Executing command 'gfortran -print-file-name=libgfortran.so' ...Yes ('/usr/lib/gcc/x86_64-redhat-linux/6.2.1/libgfortran.so').
... Looking for folder '/usr/lib64' ...Yes.
... Executing command 'which gfortran' ...Yes ('/usr/bin/gfortran').
... Executing command 'gfortran -print-file-name=libgfortranbegin.a' ...Yes ('libgfortranbegin.a').
... Looking for folder 'libgfortranbegin.a' ...No.
Did not find installed compiler 'gfortran'.
This happens on both my Fedora and Ubuntu Linux boxes. Note this only happens with fortran. I can run "mex -v timestwo.c" with no problem at all.
Outside of Matlab I can invoke gfortran with no problem.
Maybe this has to due with the compiler version. It picks up the newest version of my If it does, how can I get it use a lower version?

Risposte (1)

Zain
Zain il 10 Set 2018
Modificato: Zain il 10 Set 2018
Check this link:
and modify to your needs. Or change the version of the gfortran to the older one.

Categorie

Scopri di più su Write C Functions Callable from MATLAB (MEX Files) in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by