Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Managing include directories in Eclipse CDT

I am using Eclipse CDT (Helios release, CDT 7.0) with a C++ Makefile project. As I am new to Eclipse, I am wondering about how to manage include directories correctly. I'm #including without any paths usually, so I am used to adding my subdirectories (not so many) to the project setting's include directories. I am somewhat confused because these settings can be made on project level as well as on folder level (and I haven't understood how values are inherited yet). Also, is there a difference between Properties > C/C++ Build > Settings > GCC C++ Compiler > Include and Properties > C/C++ General > Paths and Symbols > GNU C++?

Do you know any good resource which explains these things?

like image 994
Philipp Avatar asked Aug 19 '10 13:08

Philipp


1 Answers

I've found - the hard way (few hours today), that Paths and symbols are used in the pre-processor/indexer. I'm using a Makefile project, in which case C/C++ Build/Settings does not affect the build or indexer.

To get indexing/analysis to work I had to

  1. Project -> Properties -> C/C++ Build -> Discovery Options: Enable "Automate discovery paths and symbols"
  2. Project -> C/C++ General -> Paths and Symbols: Add any necessary include paths
like image 76
ccook Avatar answered Sep 25 '22 15:09

ccook