简体   繁体   中英

Eclipse (Nvidia NSight 7.0) C++ chrono autocomplete

I am using the chrono library in a project and would like to enable autocomplete in eclipse. I've searched the internet, but failed to find a way to do so.

The IDE doesn't autocomplete std::chrono, neither system_clock.

I appreciate your help.

Thanks,

Igor Campos

With the following settings I made it partly work. Autocomplete works but only after manually adding the includes: #include <chrono> (same for other c++11 stuff like shared_ptr ).

You need to manually activate c++11 in the indexer. For nsight 7.0 you need to do the following steps:

In the project properties go to:

  1. General -> Path and Symbols -> Symbols -> Add... -> Add the __cplusplus variable with the value 201103L (c++11). The default value will be overridden.
  2. General -> Preprocessor and Include Paths, Macro etc. -> Providers -> Activate CDT GCC Built-in Compiler Settings -> Decative Share setting entries between projects (global provider) -> To Command to get compiler specs: add -std=c++11 to the line.
  3. Apply changes and rebuild the index if not done automatically (right click on project -> Index -> Rebuild ).

The problem to solve is how to force the indexer to work even when the header is not included...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM