包含非标准标头时,YouCompleteMe不显示错误

时间:2013-10-30 14:08:56

标签: c vim vim-plugin

当我尝试包含gst.h时,YCM开始存在所有错误

例如:

#include <math.h>
//#include <gst/gst.h>

main (){ //ycm show error here
int a=0;
int b    //and here
}

#include <math.h>
#include <gst/gst.h>

main (){ //ycm don't show error here
int a=0;
int b    //and here
}

gst.h的路径包含在.ycm_extra_conf.py中。我想念的是什么?

1 个答案:

答案 0 :(得分:0)

:YcmDiags显示所有警告和错误YCM消息。 您必须包含所有嵌套标题,然后YCM正确解析您的代码。 此外,您必须为C / C ++语言安装clang lib。