6

I have compiled my project on Linux and now Eclipse CDT has added some paths to includes that of course don't exist on Windows. Eclipse gives me warnings about this and it's annoying. How do I get rid of them?

C/C++ Build / Discovery Options / Clear discovery entries now doesn't help. It doesn't remove any paths.

Description Resource    Path    Location    Type
Invalid project path: Include path not found (\usr\include\x86_64-linux-gnu).   UMCC        pathentry   Path Entry Problem
Invalid project path: Include path not found (\usr\include).    UMCC        pathentry   Path Entry Problem
Invalid project path: Include path not found (\usr\include\x86_64-linux-gnu\c++\4.7).   UMCC        pathentry   Path Entry Problem
Invalid project path: Include path not found (\usr\include\c++\4.7).    UMCC        pathentry   Path Entry Problem
Invalid project path: Include path not found (\usr\lib\gcc\x86_64-linux-gnu\4.7\include-fixed). UMCC        pathentry   Path Entry Problem
Invalid project path: Include path not found (\usr\local\include).  UMCC        pathentry   Path Entry Problem
Invalid project path: Include path not found (\usr\lib\gcc\x86_64-linux-gnu\4.7\include).   UMCC        pathentry   Path Entry Problem
Invalid project path: Include path not found (\usr\include\c++\4.7\backward).   UMCC        pathentry   Path Entry Problem
Scintillo
  • 1,634
  • 1
  • 15
  • 29

3 Answers3

8

I found this where a user solved a similar problem by doing the following:

Close your project and remove file $WORKSPACE/.metadata/.plugins/org.eclipse.cdt.make.core/$YOUR-PROJECT.sc

I haven't tested this though so I'm not sure if it will work.

Christian Wilkie
  • 3,693
  • 5
  • 34
  • 49
2

If it still doesn't work after using the accepted answer remove the following directory (after backing it up...):

$WORKSPACE/.metadata/.plugins/org.eclipse.cdt.core/

After this Eclipse has to reindex all the CDT projects but in turn it also updates the paths.

Shirky
  • 347
  • 2
  • 3
  • 14
  • I found this finally worked. Specifically, the file that had to be deleted was /.metadata/.plugins/org.eclipse.cdt.core/.language.settings.xml. Details about this can be found at the bottom of this thread as well: https://bugs.eclipse.org/bugs/show_bug.cgi?id=206372. Look for entry on May 22, 2013. For good measure I shutdown eclipse and restarted it and problem was finally gone! – Brian Feb 24 '17 at 14:53
2

Deleting hidden Eclipse files may be one solution, but there is another more visible solution built into Eclipse.

Go to Project Properties -> C/C++ Build -> Discovery Options

Select the language you created your project for (C or C++) and push the Clear button. (Next the the Clear discovered entries now label.)

The warnings for the non-existent folders should vanish. A new build will add the correct folders.

Gene Z. Ragan
  • 2,643
  • 2
  • 31
  • 41
  • 3
    this option seems changed location in latest version? (Eclipse Mars) I found it in: Project Properties -> C/C++ General -> Preprocessor Include Paths, Macro etc. -> Entries -> CDT Cross Built-in Compiler Settings: press "Clear Entries" button on the right. – Seagal82 Dec 04 '15 at 06:57