Reputation: 1
I installed the gcc 6.7 compiler with fink and I can now compile Fortran code, but not execute it. On runtime there is the following error:
dyld: Library not loaded: /sw/lib/gcc5/lib/libgfortran.3.dylib
and even after running 'fink selfupdate' this persists.
'which gfortran' returns '/sw/bin/gfortran'
and
'which gcc' returns '/usr/bin/gcc'
I suspect there is a problem with linking the libraries. How could I resolve this?
Upvotes: 0
Views: 207
Reputation: 1
I resolved it eventually, thank you for your help. The problem was that gfortran was set to use version 5.5 by default. Higher versions were installed under gfortran-fsf-6 and gfortran-fsf-7 and their corresponding libraries were located in /sw/lib/gcc6 and /sw/lib/gcc7 (there was no /gcc5 present).
When I compile with
gfotran-fsf-6 "programname.f"
then everything is linked correctly.
Upvotes: 0