I wanted to start contributing to an open source C++ project recently. Only having little experience with C++, I chose Visual Studio as IDE, updated with SP1. I got the solution to build relatively easily and wanted to navigate the code a little to get an overview.
This is when I noticed that sometimes "Go to Definition"/"Go to declaration" doesn't work. Both options are available when I right-click on a symbol in the source code, but when I'm in the header file, "Go to Definition" only takes me to the declaration again for those functions that are concerned. And when I'm in the .cc file, I always get taken to the definition in the same file.
Some more things I've noticed about the functions which are concerned by this are:
1) for some functions, I can navigate to the definition from the header file, but the other direction is broken
2) navigation for some functions can be fixed if the declaration is changed to completely match the definition, e.g.
header declaration:
void buche(sint64 betrag, player_cost type);
source definition:
void karte_t::buche(sint64 const betrag, player_cost const type)
change to
header declaration:
void buche(sint64 const betrag, player_cost const type);
-> navigation works in both directions
3) when clicking into a code block of a concerned function in the source file, the scope menu at the top changes to "(Global Scope)" instead of showing the little arrow to the right (which is the symbol for a forward declaration I think?) and the class name (but those functions are definitely class members)
I've searched around a lot and this seems to be a relatively well-known problem. There's a thread here on the site: How to get IntelliSense to reliably work in Visual Studio 2008
I also found several threads on the Microsoft forums (which I can't link as I'm only allowed to post two hyperlinks), but no official confirmation of a bug or something.
The quintessence of the replies I found is that one should delete the .ncb file (which has been superseded by an .sdf database in VS2010 as I understand it), or use the option to rebuild the database on loading the solution. I did all of that multiple times, to no avail. The highest rated reply on the thread here on Stackoverflow seems to implicate that this is simply a bug (of Intellisense - did I get it right that it's this autocomplete component which is also responsible for the code navigation?) one has to accept, suggesting to use Visual Assist instead, however the question was about VS2008 then and one reply pointed to VS2010 improving on this. Another reply blamed recursive references, but I -think- this is not a problem in this project as all the files (certainly those few I've checked and encountered the problems with) have include guards. It has also been confirmed to me by one coder of that project that he has the same problems. But I'm not so keen on spending money on Visual Assist, it's only meant to be a little hobby ...
Having a lot of experience with Eclipse/Java, it just seems weird to me that such a relatively essential feature of an IDE doesn't work reliably. Of course I can understand that static code analysis is much more difficult for C++ than for Java. But then again, Visual Studio is a commercial product which has had a lot of development cycles.
So to sum this post up, is this an unavoidable bug?