score:5

Accepted answer

i managed to solve this thanks to comments here.... i ended up recreating my project. i used the import method to download a project from cvs, and told it to use the new project wizard to do so. when i got the new project dialog, i told it this was a c++ project, and the indexing now works fine.

i still wish i could index files without having to attach a specific project type to it, but at least i found an answer.

thanks for the help all.

score:0

please try the following (my project is set up differently, so i am not sure this will work for you).

go to properties -> c/c++ general -> paths and symbols -> source location.

do you see your source folder there?

i observe this behavior: when i add a source folder and then exclude it from build, it disappears from the above list. after that the folder is no longer indexed. re-adding it to "source location" solves the problem: the folder is now indexed; remains excluded from build (as intended); is visible among source locations.

i believe it is a bug -- excluding a source folder from build should not remove it from source locations list.

score:0

in coocox ide (eclipse + gcc) the problem is resolved by going from file menu edit > preferences > c/c++ / indexer > build configuration for indexer set to active build configuration and the rebuild the project (ctrl r).

score:0

if the project is already converted to c/c++ and still the index is not working you can right click on the project and index and rebuild. the project will start indexing right away.

score:0

i am using

eclipse ide for c/c++ linux developers

version: helios service release 2 build id: 20110218-0911

i followed the suggestions above and in addition i had to mark all referenced projects (with in the work space) using project properties->project references

score:0

the following has worked for me in eclipse neon: new project -> c/c++ -> makefile project with existing code -> next. then navigate to the code and finish the project creation. indexing starts automatically.

score:1

i have experienced problems with the indexer of eclipse luna when there was an unresolved friend declaration in the class declaration - it seems then that the indexer skipped indexing the rest of that class, and all references to it was shown as unresolved by the indexer.

solution: removed the unresolved friend declaration (in my case, it was legacy code that was no longer needed).

score:2

indexing of files and variables under different flags is always complicated when we have a huge project, lot of files and more importantly lot of different build options. i prefer playing around with the indexer option to help me browse the entire code. you can find it : project properties>c/c++ general/indexer.

you can choose "enable project specific settings"

then it's up to you to choose the options you want for your project. for a particular build we can choose "use active build configuration" so that only the files and macros are considered which are used by the build script. or index all source files in the entire project.

score:2

i am using eclipse neon 3, here's the solution that worked for me :

  • go to file
  • new
  • convert to c/c++ autotools project then select your project and finish.

it can take some time to finish indexing, it depends on your project size.

score:3

in the project explorer panel, right click the project you want to re-index, then select index, then select the action you want

score:4

exit eclipse. in workspace go to ".metadata/.plugins/org.eclipse.cdt.core" and delete everything in there.

score:11

i faced similar situation. i solved it in this way: right-click the project in project view-->select index-->rebuild.

score:31

i had exactly same issue as op but for some reason the menus in eclipse i was using (helios service release 2) were not "go to properties -> c/c++ general -> paths and symbols -> source location.".

the way i fixed the issue was :

  • in c/c++ view, right-click on top project name;
  • in the menu, select new->c++ project;
  • in the window that appears, select convert to and then select c++ project;
  • click ok to close the window.

eclipse will start indexing right away. depending on the size of source tree it may take a while but you will have the indexing working finally after that.


Related Query

More Query from same tag