我为eclipse设置了CDT并编写了一个简单的hello world C程序:
#include <stdio.h>
int main(void)
puts("Hello, world.");
return 0;
}
有没有人有任何想法如何删除它?
发布于 2018-04-24 19:24:34
Eclipse正在使用的编译器能够很好地解析符号,因此代码将很好地编译。
但是Eclipse使用的代码完成/预处理器不知道stdio.h的存在位置。
你需要指定stdio.h所在的文件系统路径。
请参阅:http : //help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_paths.htm
发布于 2018-04-24 20:27:32
对我来说,我必须添加stdio.h所在的路径。在Eclipse中,打开项目的属性,展开“C / C ++常规”并选择“路径和符号”。
确保你已经为你正在使用的每种语言添加了目录:
https://stackoverflow.com/questions/-100004450
复制相似问题