简体   繁体   中英

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM