OSX - replace gcc version 4.2.1 with 4.9 installed via Homebrew

后端 未结 4 1296
你的背包
你的背包 2020-11-28 20:00

This has been plaguing me for awhile now. I am trying to compile a huge C++ file (I know it works as I it works fine on my Arch Linux computer at work). When I checked my GC

4条回答
  •  时光说笑
    2020-11-28 20:58

    OS X does not come with GCC installed (4.2.1 or otherwise). Clang is the default system compiler and has been for some time. It is using the C++ headers from 4.2.1 when invoked as GCC. Have you tried compiling your code with Clang natively, instead of calling "gcc" (which calls Clang)? It has more modern headers and C++ support than the GCC emulation mode.

提交回复
热议问题