Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
YouCompleteMe没有';包含非标准标题时不显示错误_C_Vim_Vim Plugin - Fatal编程技术网

YouCompleteMe没有';包含非标准标题时不显示错误

YouCompleteMe没有';包含非标准标题时不显示错误,c,vim,vim-plugin,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 } #包括 //#包括 main(){//ycm在此处显示错误 int a=0; int b//这里 } 但是 #包括 #包括 main(){//ycm此处不显示错误 int a=0; int b//这里 }

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

例如:

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

main (){ //ycm show error here
int a=0;
int b    //and here
}
#包括
//#包括
main(){//ycm在此处显示错误
int a=0;
int b//这里
}
但是

#包括
#包括
main(){//ycm此处不显示错误
int a=0;
int b//这里
}

gst.h的路径包含在.ycm_extra_conf.py中。我错过了什么?

:YcmDiags
显示所有警告和错误YCM消息。 必须包含所有嵌套的头,然后YCM正确解析代码。
您还必须安装适用于C/C++语言的
clang
lib correct。

YCM的问题跟踪程序是。这不是
main
函数的有效声明。它必须返回一个
int
,并接受两个参数或
void
。所以它应该看起来像
intmain(void){…}
我知道错误在哪里。我不知道为什么YCM会忽略它。谢谢你的问题跟踪。
#include <math.h>
#include <gst/gst.h>

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