I am running macOS 10.13.5 and I have installed Fortran using Homebrew. I can compile and build a program like this:
program HelloWorld
write(*,*)'Hello World'
end program
But when I try to run it I get the same error:
dyld: Library not loaded: @rpath/libgfortran.3.dylib
Referenced from: /Users/sergiobacelar/Documents/books2calibre/books_software/feher_fortran/prog01/prog01_01/Build/prog
Reason: image not found
/var/folders/tq/f5jbfqp97y52w_y7byn05_fw0000gn/T/geany_run_script_2Q4DKZ.sh: line 7: 47712 Abort trap: 6 "Build/prog"
I have libgfortran.3.dylib
inside anaconda3/lib
and I have gcc 8.1.0
in homebrew but when I do gfortran -v
I get gcc 4.8.5
from Anaconda.