RichieHindle RichieHindle - 1 year ago 72
C++ Question

Displaying the #include hierarchy for a C++ file in Visual Studio

Problem: I have a large Visual C++ project that I'm trying to migrate to Visual Studio 2010. It's a huge mix of stuff from various sources and of various ages. I'm getting problems because something is including both


Question: What tools and techniques are there for displaying the
hierarchy for a Visual Studio C++ source file?

I know about
cl /P
for getting the preprocessor output, but that doesn't clearly show which file includes which other files (and in this case the
output is 376,932 lines long 8-)

In a perfect world I'd like a hierarchical display of which files include which other files, along with line numbers so I can jump into the sources:


Answer Source

There is a setting:

Project Settings -> Configuration Properties -> C/C++ -> Advanced -> Show Includes

that will generate the tree. It maps to the compiler switch /showIncludes

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download