Reputation: 574
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?
Upvotes: 1
Views: 715
Reputation: 69
After upgrading to a new Xcode version such as v7.0.0, OS X asks for agreeing to a license agreement by prompting:
"Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo."
You can open up a terminal and type in "sudo gcc" and enter your admin password to accept the license agreement. Only after this is done, eclipse Discover can generate the updated include paths for CDT GCC Built-in Settings.
Upvotes: 1
Reputation: 4207
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.
Upvotes: 3