c ++:错误:无法识别的命令行选项'-std = gnu ++ 14'

Der*_*erk 3 c++ compiler-errors

我尝试建立fblualib。但是,在运行build.sh时,出现以下错误:

-- Found Folly: /usr/local/include  
-- Found Torch7 in /home/dmus/torch/install
-- Found Folly: /usr/local/include  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dmus/fblualib/fblualib/build
[ 25%] Building CXX object CMakeFiles/fblualib.dir/LuaUtils.cpp.o
c++: error: unrecognized command line option ‘-std=gnu++14’
make[2]: *** [CMakeFiles/fblualib.dir/LuaUtils.cpp.o] Error 1
make[1]: *** [CMakeFiles/fblualib.dir/all] Error 2
make: *** [all] Error 2
Run Code Online (Sandbox Code Playgroud)

g ++ --version输出g ++(Ubuntu 4.8.4-2ubuntu1〜14.04.1)4.8.4。我看到了相关的问题,但是我看不到如何解决此问题。

Shr*_*n40 5

您需要升级g ++(至少要升级到4.9。*版)。

升级完成后,请尝试使用g++ -std=c++14 file.cpp或进行编译g++ -std=c++1y file.cpp