先查找系统的头文件路径
[[email protected] ~]$ sudo find / -iname ‘iostream‘ /usr/include/c++/4.4.4/iostream /usr/local/include/c++/6.3.0/iostream [[email protected] ~]$ sudo find / -iname ‘fstream‘ /usr/include/c++/4.4.4/fstream /usr/local/include/c++/6.3.0/fstream [[email protected] ~]$ [[email protected] ~]$ sudo find /usr/ -iname ‘*python.h‘ /usr/share/doc/python-matplotlib-0.99.1.2/CXX/WrapPython.h /usr/include/python2.6/Python.h
配置前
在flags中添加系统头文件路径
在flags中添加第三方/自定义头文件路径
vim ~/.vim/.ycm_extra_conf.py 添加内容 flags = [ ‘-isystem‘, ‘/usr/local/include/c++/6.3.0/‘, ‘-isystem‘, ‘/usr/include/python2.6/‘, ]
配置后
时间: 2024-10-01 13:25:15