【发布时间】:2017-05-19 07:32:26
【问题描述】:
尝试在 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时没有看到设置不同的编译器
我已经尝试将 cc,c++,gcc 和 g++ 添加到 PATH 并将它们符号链接到 usr/local/bin 和 usr/bin 无济于事,它总是诉诸 clang++
如何将g++-5.2.0 指定为编译器?
【问题讨论】:
-
也许这会有所帮助。 stackoverflow.com/a/21492814/4669978
标签: macos c++11 gcc compiler-errors homebrew