C++11 Support in Eclipse CDT Indexer for Juno/Kepler/Luna
Eclipse CDT's indexer provides error highlighting before compilation. While this question focuses solely on configuring the indexer for C++11 support, it's important to note that this does not modify compiler settings.
To enable C++11 support in the indexer, navigate to:
-
Project properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> tab Providers -> CDT GCC Built-in Compiler Settings
Append -std=c++0x (or -std=c++11) to the "Command to get compiler specs" field.
${COMMAND} -E -P -v -dD ${INPUTS} -std=c++0x
登入後複製
Sources:
- [Eclipse CDT FAQ](http://wiki.eclipse.org/CDT/User/FAQ#CDT_does_not_recognize_C.2B.2B11_features)
- [Eclipse CDT Forums](http://www.eclipse.org/forums/index.php/mv/msg/373462/909018/#msg_909018)
Related:
- [Eclipse CDT C++11/C++0x support](https://stackoverflow.com/questions/12037670/eclipse-cdt-c-11-c-0x-support)
- [C++11 compiler enablement for Kepler and earlier](https://stackoverflow.com/a/17499266/760746)
- [C++11 compiler enablement for Kepler (updated) and newer](https://stackoverflow.com/a/22480299/760746)
Update:
Tested successfully with:
- Kepler (CDT 8.2)
- Luna (CDT 8.4)
以上是如何在 Eclipse CDT Indexer for Juno/Kepler/Luna 中啟用 C 11 支援?的詳細內容。更多資訊請關注PHP中文網其他相關文章!