How to fix the clang include path warning in Eclipse CDT for the Hello World project (mac OS)

advertisements

I'm using Eclipse Luna 4.4.1 CDT 8.5.0 in mac OS X Yosemite.

When creating any C++ project (Hello world one for example), even if it compiles and runs correctly, there is always a warning for the include path: (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/6.0/include).

That path doesn't exist.

Why is the include path automatically generated and how can I change the include path to a correct one?

Is that include really needed?


The missing path may be the result of applying updates to xcode. The new clang version is 6.1, and the 6.0 path no longer exists.

I found the fix only by poking around the settings. Hopefully this will work for you:

Go to workspace settings (cmd ,)

Then C/C++ --> Build --> Settings and click on the Discovery button.

Then click on CDT GCC Built-in Compiler Settings to highlight it.

Click on the Reset button to the right.

The include paths should be updated.