使用cmake的时候出现c++ doesn't support -std=c++11 or -std=c++0x

用cmake的时候出现这句话,要怎么弄?

/usr/bin/c++ doesn't support -std=c++11 or -std=c++0x, you need one that
  does.
阅读 12.6k
4 个回答

C++ 版本是什么,不一定支持这两个选项。

c++11,c++0x
The 2011 ISO C++ standard plus amendments. Support for C++11 is still experimental, and may change in incompatible ways in future releases. The name c++0x is deprecated.

请问楼主解决问题了吗,我也遇到了。更新gcc到5.30版本还是不行,

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进