"未解决的包容"误差Eclipse CDT的为C标准库头 [英] "Unresolved inclusion" error with Eclipse CDT for C standard library headers

查看:179
本文介绍了"未解决的包容"误差Eclipse CDT的为C标准库头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设立了CDT Eclipse和写了一个简单的Hello World的C程序:

I set up CDT for eclipse and wrote a simple hello world C program:

#include <stdio.h>

int main(void){
    puts("Hello, world.");
    return 0;
}

该方案建立和运行正常,但是Eclipse不断显示被列入发言,指出一边这个黄色问号的未解决的包容:其中,文件stdio.h&gt;中当我把鼠标在它。

它不影响程序运行,但我觉得相当恼人的。

It doesn't affect running of the program but I find it rather annoying.

有没有人有任何想法如何去除呢?

Does anyone have any idea how to remove it ?

推荐答案

Eclipse是使用编译器能够解析符号就好了,所以code编译罚款。

The compiler Eclipse is using is able to resolve the symbols just fine, so the code will compile fine.

不过,code-完成/ preprocessor ​​Eclipse是使用的是不知道在哪里stdio.h中存在。

But the code-completion/preprocessor Eclipse is using doesn't know where stdio.h exists.

您需要指定文件stdio.h所在的文件系统路径。

You need to specify the filesystem path where stdio.h is located.

请参阅:<一href=\"http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_paths.htm\">http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_paths.htm

这篇关于&QUOT;未解决的包容&QUOT;误差Eclipse CDT的为C标准库头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆