gem install nmatrix - 你需要一个支持-std = c ++ 0x或-std = c ++ 11的g ++版本

时间:2016-03-08 15:30:34

标签: c++ ruby gcc rubygems

我正在使用nmatrix在Mac OS X上安装gem install nmatrix(10.11.3(15D21))并收到以下错误消息:

checking for apparent GNU g++ binary with C++0x/C++11 support...
  ⏎ Exception `RuntimeError' at extconf.rb:141 - You need a version
  ⏎ of g++ which supports -std=c++0x or -std=c++11. 
  ⏎ If you're on a Mac and using Homebrew, we recommend
  ⏎ using mac-brew-gcc.sh to install a more recent g++.

nmatrix页面提及gcc但不提及g++ - 即https://github.com/SciRuby/nmatrix/wiki/Installation

有什么建议吗?

1 个答案:

答案 0 :(得分:-1)

g ++是GCC的编译器可执行文件

你要添加标志来编译设置:

-std=c++0x

-std=c++11