Thanks all for useful guides and suggestions. I did what you commented and suggested. It works now. Kind regards, Edris On Thu, Jun 4, 2020 at 12:33 AM Iain Sandoe <idsandoe@xxxxxxxxxxxxxx> wrote: > Hi Edris, > > Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > > > CCing Iain, who can offer more help. > > > > On Wed, 3 Jun 2020 at 20:38, Edris Tajfirouzeh via Gcc-help > > <gcc-help@xxxxxxxxxxx> wrote: > >> Dear Operator > >> I'm trying to install gfortran and gcc on my mac catalina version > 10.15.4. > >> I have already installed xcode and command line tools. I have also > >> installed home brew. > > >> When I type "which gcc" and "gcc --version" I get the following answer: > > >> Apple clang version 11.0.3 (clang-1103.0.32.62) > >> Target: x86_64-apple-darwin19.4.0 > >> Thread model: posix > >> InstalledDir: > >> > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin > >> > >> I wonder if I have installed it correctly. I found that this is not > gcc > >> and > >> it is clang that I have installed. Please guide me . > > The XCode installation includes two shim executables ‘gcc’ and ‘g++’ which > invoke the clang compiler in a posix-compatible manner (clang is stated to > be compatible with gcc-4.2.1). This can be confusing, but does allow > people > to build things with configurations that expect ‘gcc’ and ‘g++’. > > ----- > > So - you have *not* invoked any compiler you installed via homebrew, but > the > ones that are installed as part of XCode. > > >> Any way, I need gfortran compiler and when I type "which gfortran" I get > >> the following message. > > >> [edriss-MacBook-Pro:~] edris% which gfortran > >> gfortran: Command not found. > > I haven’t got any specific experience of homebrew, but my suggestion there > would be to ensure that your PATH contains the correct entries for the > homebrew > stuff - and make sure that you “brewed” the gfortran and that suceeded. > > HTH > Iain > >