Eclipse CDT: Unresolved inclusion of stl header

This allowed me to avoid Eclipse “Unresolved inclusion” error. In my case I had to find the location of the C++ vector header on my computer (which is a Mac): find /usr/local -name vector -print I found the correct include location in folder “/usr/include/c++/4.2.1”. Then I set my project eclipse settings like so: Project->Properties->C/C++ General->Paths … Read more

How to configure Eclipse CDT for cmake?

In Eclipse-CDT you do not create cmake projects but you import cmake projects. This is what you should do: Say the source of your CMake project named “Planner” is located in D:/javaworkspace/src/Planner Create a folder (the folders NEED to be parallel to each other): D:/javaworkspace/build/Planner Go to the folder D:/javaworkspace/build/Planner and run CMake using the … Read more

Clean Eclipse Index, it is out of sync with code

Right-click on your project, go under the Index submenu, and choose either “Rebuild,” “Update with modified files,” or “Freshen all files.” I don’t know the difference between those three options, but one of “Update with modified files” or “Freshen all files” usually fixes it for me. Also, I’m sure you’ve already done this, but make … Read more

How can I convince Eclipse CDT that a macro is defined for source code editing and code completion?

In addition to Oswald’s answer: If you have several build configurations, the default behavior of the Eclipse Indexer seem to be that it always uses the first build configuration. In my case the define was only defined in the 3rd build configuration, so the solution provided by Oswald did not help. To change this globally, … Read more