Configuring C 11 Support in Eclipse CDT (Juno/Kepler/Luna) Indexer
To activate support for C 11 in the Eclipse CDT indexer for Juno/Kepler/Luna, follow these steps:
- Navigate to the project properties via "Project Properties -> C/C General".
- Select the "Preprocessor Include Paths, Macros etc." tab.
- Switch to the "Providers" page.
- Select "CDT GCC Built-in Compiler Settings".
- In the "Command to get compiler specs" field, append "-std=c 0x" or "-std=c 11" to the end of the existing command.
After making these changes, the Command to get compiler specs field should resemble the following:
${COMMAND} -E -P -v -dD ${INPUTS} -std=c++0x
Copy after login
Sources:
- [Eclipse Wiki: CDT User FAQ](http://wiki.eclipse.org/CDT/User/FAQ#CDT_does_not_recognize_C.2B.2B11_features)
- [Eclipse Forums: CDT Eclipse doesn't recognize C 11](http://www.eclipse.org/forums/index.php/mv/msg/373462/909018/#msg_909018)
Related Links:
- [Eclipse CDT C 11/C 0x support](https://stackoverflow.com/questions/2908727/cdt-c-11-c-0x-support)
- [C 11 - enable the compiler (Kepler and before)](https://stackoverflow.com/a/17499266/760746)
- [C 11 - enable the compiler (Kepler (updated) and newer)](https://stackoverflow.com/a/22480299/760746)
Verified Platforms:
This configuration has been successfully tested on:
- Kepler (CDT 8.2)
- Luna (CDT 8.4)
The above is the detailed content of How can I configure Eclipse CDT to support C 11?. For more information, please follow other related articles on the PHP Chinese website!