首頁 > 後端開發 > C++ > 如何在 Eclipse CDT Indexer for Juno/Kepler/Luna 中啟用 C 11 支援?

如何在 Eclipse CDT Indexer for Juno/Kepler/Luna 中啟用 C 11 支援?

DDD
發布: 2024-11-15 09:53:02
原創
468 人瀏覽過

How to Enable C++11 Support in Eclipse CDT Indexer for Juno/Kepler/Luna?

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中文網其他相關文章!

來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板