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

添加對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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章