On 3/2/23 2:15 PM, Christian Opp wrote:
> Hello,
> I'm new to Fortran and have been trying to install it on MacOS, without success. I have installed XCode, and command line developer tools and gfortran. However, Fortran does not show up as a language in XCode.
>
> I would greatly appreciate any help.
> Thanks,
> Christian
I have installed gfortran using the fink package manager for the last
20+ years. The instructions are at the fink download page.
https://www.finkproject.org/download/srcdist.php
You do not need the entire Xcode package (which is now some 40GB in
size), you just need the command line tools.
However, lately since MacOS 11, and especially since the introduction of
Apple arm64 hardware, I have been using Homebrew.
https://brew.sh
Here you also do not need the full Xcode, just the command line tools.
If you just follow the instructions, it works.
I also use the intel compiler on Macs with intel hardware. The "classic"
compiler is still supported by intel on MacOS, but the new ifx compiler
is not.
I have also recently installed the NAG compiler successfully on MacOS.
https://www.nag.com/content/nag-fortran-compiler
It works well with new codes, but it does not compile all of my legacy
codes. I don't hold that against NAG, some of those old codes have
nonstandard extensions dating from the 1970s.
$.02 -Ron Shepard