Re: Question on gnu compiler for mac

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux