gpt4 book ai didi

eclipse-cdt - Eclipse CDT C/C++ 错误

转载 作者:行者123 更新时间:2023-12-01 02:52:31 27 4
gpt4 key购买 nike

我正在测试 Eclipse 的 CDT 包。我正在尝试用 C 编译和运行一个简单的 Hello World 程序。

 #include <stdio.h>

int main(void {
printf("Hello World");

system("PAUSE");
return 0;
}

但它给了我错误: Unresolved inclusion :
我该如何解决?

最佳答案

这取决于您的确切上下文(操作系统、Eclipse 版本、CDT 版本)。
有可能:

  • index issue ,

  • Just recently upgraded to Eclipse Ganymede RC4 with CDT 5 (release from June 17th). I am having some difficulties with "Unresolved Inclusion" warnings (from the Indexer I assume?).


    从 Callisto 更改为 Ganymede 后,我第一次构建项目时遇到了同样的问题。我从快速索引器更改为完整索引器并进行了完整索引,从而解决了问题(我还检查了索引所有文件,但我不知道这是否必不可少)。然后我可以改回快速索引器,一切正常。
  • preference issue :

  • I guess this could be solved in the preferences for the project.Under the point c/c++ general -> Paths and symbols. In the tab "includes" under GNU C++, you can add the location of the include files.


  • 或者,如 this thread illustrates ,上下文问题:

  • This happens if you use Eclipse/CDT on a windows system with Cygwin or mingw.
    When CDT follows the include paths there in no path "asm" in the include directory - just an "asm.lnk" which causes the problem.

    关于eclipse-cdt - Eclipse CDT C/C++ 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4422779/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com