需要在默认的.ycm_extra_conf.py 中添加(C++的路径可能需要根据版本号修改)
‘-isystem‘, ‘/usr/include‘, ‘-isystem‘, ‘/usr/include/c++/5.3.1‘, ‘-isystem‘, ‘/usr/include/linux‘,
同时在.vimrc中添加(路径为.ycm_extra_conf.py文件的路径)
let g:ycm_global_ycm_extra_conf = ‘~/.vim/bundle/YouCompleteMe/cpp‘
时间: 2024-12-23 14:06:55