YouCompleteMe没有';包含非标准标题时不显示错误
当我尝试包含gst.h时,YCM开始初始化所有错误 例如: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//这里 }
#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
}