I'm trying to modify an existing C++ application, and I end up in header hell:
In my newly created *.h file, I need to add an attribute to my new class, this new attribute being of the type "Timer", defined in "Timer.h".

This means that I need to add #include "Timer.h" at the beginning of my header file, but when I do that, I get error messages, referring to the file (don't laugh) c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.11.25503\include\cwctype, as if I've messed up a central file, just by adding a reference to a file, not even closely related to that central file, in other words, I've arrived in header hell :-)

The software I'm now working on, is very new, and there's here the mentality "As long as it works, it's OK", so nobody ever cared about the quality/readability/maintainability/..., so when a new developer arrives (like me), it's easy to fall into the header problem.

So my question: does anybody know about a graphical tool, which can read Visual Studio projects/solutions, read their #include directives, and from that, make a graph of those, so that in case of the mentioned problems, I can see what's the best way to avoid the mentioned problems?

Thanks in advance


You can try CppDepend which provided an advanced dependency graph tool integrated to VS

Generating a graph from the Dependency Structure Matrix of a dependency cycle between some projects

A generated graph of dependencies between some projects

You have also many features to understand the existing code base and a powerful code query language to query your code like a database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.