0

I am not a C++ developer, but I am trying to get a C++ compiler for running my Lua-lsp and linters. I tried to install gcc with homebrew, but still the version I checked is always 4.2.1.

I am installing like this:

brew install gcc@7

When I do version check, I get this

gcc -dumpversion
// 4.2.1

Is the version wrong or is the way I install is incorrect?

John Winston
  • 1,260
  • 15
  • 30
  • 4
    macOS (formerly OS X) has XCode + clang both of which support C++20, C++17 etc. Why GCC? If you install XCode + [XCode Command-Line Tools](https://stackoverflow.com/questions/9329243/how-to-install-xcode-command-line-tools) you get everything you need. You can even install the tools independently if you want. – tadman May 04 '21 at 14:44
  • [The binary should be called gcc-7](https://apple.stackexchange.com/a/297052) –  May 04 '21 at 14:47

0 Answers0