LoginSignup
0
0

More than 5 years have passed since last update.

MacOSX で Fortran を使った備忘録

Posted at

職務の関係上、MacOSX で Fortran を使わなければならなくなったのですが、設定に少し苦労したので備忘録を以下に残します。

Conda

 conda create -n fortran -c gfortran_osx-64 gfortran_osx-64

起こった問題

  • xcode-select がないと言われたのでインストールした。
  • gfortran hello.f -o hello.exe したあと ./hello.exe したら以下のようなエラーが吐かれた。

    dyld: Library not loaded: @rpath/libgfortran.3.dylib

解決手段

理屈は分かってないけど、 https://github.com/ContinuumIO/anaconda-issues/issues/739 を参考に

gfortran hello.f -Wl,-rpath,${CONDA_PREFIX}/lib -o hello.exe

したら動いた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0