[英]error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’ and PCL errors
[英]c++: error: unrecognized command line option ‘-std=gnu++14’
我嘗試構建 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
g++ --version 輸出 g++ (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4。 我看到了相關的問題,但是我不知道如何解決這個問題。
您需要升級您的 g++(至少到 4.9.* 版)。
升級完成后,嘗試使用g++ -std=c++14 file.cpp
或g++ -std=c++1y file.cpp
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.