4
votes

I'm testing out the CDT package for eclipse. I am trying to compile and run a simple Hello World program in C.

 #include <stdio.h>

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

    system("PAUSE");
    return 0;
   }

But it's giving me the error: unresolved inclusion: How do I fix this?

1

1 Answers

3
votes

It depends on your exact context (OS, Eclipse version, CDT version).
It can be:

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?).

I had the same problem the first time I built my project after changing from Callisto to Ganymede. I changed from the Fast Indexer to the Full Indexer and did a full index, which resolved the problem (I also checked Index All Files, but I don't know if that was essential). I could then change back to the Fast Indexer and everything worked.

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 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.