Search code examples
autocompleteeclipse-cdt

Eclipse CDT autocompletion of #include


Eclipse CDT offers autocompletion of your header files when you write new #include "something" statements.

In our project, we use -I. and require all includes to state full paths from the project base folder. Unfortunately, I cannot get the autocompletion of Eclipse to work in this way - it only seems to work when using relative paths to the current file. (once the whole file with its path is entered, there is no issue switching to it with F3, though). My question now is, whether one can change some options to make Eclipse's autocompletion for includes work from the project base instead of only relative to the file?


Solution

  • In your project properties, add the root of your project to C/C++ General -> Paths and symbols under the Include tab.