6

I am a new Mac user and was wondering if installing gcc via brew install gcc command would install GNU C++ compiler?

7
  • If you install XCode from the app store, you get gcc with it.
    – WGroleau
    Oct 30, 2018 at 16:34
  • 1
    @WGroleau xcode does not provide gcc. It provides clang which is usually sufficient don't assume that gcc us the correct compiler to use.
    – mmmmmm
    Oct 30, 2018 at 21:20
  • Didn't know they changed it. Used to be gcc.
    – WGroleau
    Nov 2, 2018 at 23:32
  • @mmmmmm it provides both clang++ and gcc and both of them are installed in this dir. /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    – Vignesh S
    Oct 7 at 3:53
  • @Vignesh Try running that gcc as gcc --version What does it print?
    – mmmmmm
    Oct 7 at 9:52

1 Answer 1

5

Yes, installing gcc using brew install gcc will install GNU C++ compiler.

The compiler is installed by default in /usr/local/Cellar/gcc/8.2.0/bin.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .