我试图从github制作一个应用程序,但收到错误

时间:2016-06-11 19:31:41

标签: ubuntu makefile cmake

这是我尝试制作pokerstove的应用程序。我正在按照如何在linux平台上制作它的说明,但在执行make命令时遇到错误。

usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file
 requires compiler and library support for the ISO C++ 2011 standard.
This support is currently experimental, and must be enabled with the 
-std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \

我尝试使用标志

sudo make CPPFLAGS+="-std=c++11 ..."

但它不起作用。请有人帮忙。

谢谢

1 个答案:

答案 0 :(得分:2)

使用CMake项目,您可以通过将编译标志传递给cmake可执行文件来更改编译标记:

cmake "-DCMAKE_CXX_FLAGS=-std=c++11" <source-dir>
相关问题