指定编译器Homebrew安装

时间:2017-01-04 21:25:04

标签: macos c++11 gcc compiler-errors homebrew

尝试在OSX 10.8上使用mkvtoolnix安装homebrew时遇到了障碍

当我尝试brew install mkvtoolnix时,我收到以下错误跟踪

checking for support for C++11 feature "nullptr"... yes
checking for support for C++11 feature "tuples"... yes
checking for support for C++11 feature "alias declarations"... yes
checking for support for C++14 feature "std::make_unique"... no
checking for support for C++14 feature "digit separators"... no
checking for support for C++14 feature "binary literals"... no
checking for support for C++14 feature "generic lambdas"... no
The following features of the C++11/C++14 standards are not supported by clang++:
  * std::make_unique function (C++14)
  * digit separators (C++14)
  * binary literals (C++14)
  * generic lambdas (C++14)
If you are using the GNU C compiler collection (gcc) then you need
at least v4.9.x.
configure: error: support for required C++11/C++14 features incomplete

这是有道理的,因为clang ++不支持C ++ 14功能。此外,我已经安装了GCC 5.2,因此可以使用g++-5.2.0来编译它们。

问题是我在调用brew install

时没有看到设置不同的编译器

我已尝试将ccc++gccg++添加到PATH,并将其与usr/local/binusr/bin进行符号链接无济于事,总是诉诸clang++

如何指定g++-5.2.0作为编译器?

0 个答案:

没有答案