在YouCompleteMe+Syntastic中添加和取消对C++11的支持

来源:互联网 发布:网络女主播大尺度直播 编辑:程序博客网 时间:2024/05/18 14:24

添加对c++11的支持:

/.vimrc中添加:

  let g:syntastic_cpp_compiler = ‘g++‘  "change the compiler to g++ to support c++11. 
  let g:syntastic_cpp_compiler_options = ‘-std=c++11 -stdlib=libc++‘ "set the options of g++ to suport c++11.
.ycm_extra_conf.py中:

  将flags数组中的‘-Wc++98-compat‘修改为‘-Wnoc++98-compat‘

 

取消对C++11的支持:

/.vimrc中去掉添加的两行syntastic配置。

.ycm_extra_conf.py中改回来,并且在flags数组中将‘-std=c++11‘修改为‘-std=c99‘


原文地址:http://www.mamicode.com/info-detail-512006.html

0 0
原创粉丝点击