对于makefile不支持c++11的处理

错误信息
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.

正确操作
修改makefile 正确示例 添加 -std=c++11

test_timer:test_timer.cpp
	g++ $^ -o $@ -levent -std=c++11
	./$@

你可能感兴趣的:(c基础)