Fortran77のMEX化に関して

Fortran77ファイルをMEX化しようと考え、
mex 〇〇.f
とコマンドラインで入力したところ
サポートされているコンパイラまたは SDK が見つかりません。オプションについて は、 http://www.mathworks.com/support/compilers/R2016b/win64.html を参照してください。
とエラーが表示されました。これは、FortranのコンパイラをインストールしてMATLABに紐づけ?すればよいのでしょうか。

1 Comment

michio
michio on 14 Jun 2018
URLをハイパーリンク化いたしました。

Sign in to comment.

 Accepted Answer

michio
michio on 14 Jun 2018
おっしゃる通りです。使用されているMATLABバージョンで対応している Fortran コンパイラーをインストールし、MATLAB上で
mex -setup FORTRAN
と実行して頂ければ設定完了です。

3 Comments

O.E
O.E on 14 Jun 2018
回答ありがとうございます。 Gfortranの4.8.1をダウンロードしてインストールを実行しました。
mex -setup FORTRAN
をさっそく実行したのですが、同じエラーが表示されてしまいます。
cmd上で
gfortran --version
と実行すると
GNU Fortran (tdm64-2) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
と出力されているので、インストールには成功していると思うのですが
何が問題になっているのでしょうか。
GfortranのインストールパスはC:\TDM-GCC-64です。
michio
michio on 14 Jun 2018
Gfortran は残念ながら対応しておりません。
にある通り、Fortranに関しては以下の3つが対応コンパイラとなります。
  • Intel Parallel Studio XE 2016 for Fortran 3
  • Intel Parallel Studio XE 2015 for Fortran 3
  • Intel Visual Fortran Composer XE 2013 3
O.E
O.E on 28 Jun 2018
ありがとうございます。

Sign in to comment.

More Answers (0)

Categories

Asked:

O.E
on 14 Jun 2018

Commented:

O.E
on 28 Jun 2018

Community Treasure Hunt

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

Start Hunting!