【发布时间】:2017-02-24 07:06:29
【问题描述】:
我需要构建和制作源,但是出现了这个错误:
error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
我在其他主题中看到,通过将 CMakeLists.txt 中的标志更改为“-std=c++11”可以轻松解决此问题,但构建目录中没有 CMakelists.txt。
有人可以帮我吗?
-- OBS:我在 Ubuntu 16.04 上
【问题讨论】:
-
我们需要更多信息。您使用什么命令来构建源代码?
-
mkdir build && cd build && cmake .. && make
-
cmake 版本 3.5.1
-
然后 CMakeLists.txt 在构建的父文件夹中(因此是
cmake ..)。 -
LS: CMakeCache.txt CMakeFiles cmake_install.cmake Makefile
标签: c++ c++11 makefile build cmake