Using Homebrew with alternate GCC

前端 未结 4 895
走了就别回头了
走了就别回头了 2020-12-04 20:47

I\'ve installed gcc-4.6 using the homebrew-alternatives gcc formula, but I can\'t seem to get it to use that GCC to install other formulas. Specifi

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 20:49

    These answers are all fairly old now. It seems that recent versions of homebrew have a '--cc' option that enables you to select the c compiler to use. For example

    brew install --cc=gcc-6 
    

    will install using the brew version of gcc

提交回复
热议问题