Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c++: error: unrecognized command line option ‘-std=gnu++14’

I try to build the fblualib. However, when running build.sh I get the following error:

-- 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

g++ --version outputs g++ (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4. I see related questions, however I do not see how to fix this.

like image 397
Derk Avatar asked Oct 05 '16 10:10

Derk


1 Answers

You need to upgrade your g++ (At least to version 4.9.*).

Once upgrade is done, try compiling using g++ -std=c++14 file.cpp or g++ -std=c++1y file.cpp.

like image 172
Shravan40 Avatar answered Sep 29 '22 23:09

Shravan40