Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio plugin to find out which files are being included implicitly

A particular header file may only be including "Foo.h" but Foo.h is including other headers which implicitly include many other headers. I would like to know all the headers that a particular file is including.

In case anybody is wondering why a plugin for Visual Studio; simply because of the way the include directories are set-up in the project. If an external tool does the job and allows me to specify the locations where it can search for the header files, that will do as well.

like image 460
Samaursa Avatar asked Nov 18 '25 23:11

Samaursa


2 Answers

I don't know of any plugins that do this, but you could whip up a homebrew solution by turning on the showIncludes flag in your projects settings, then doing a full build and parsing the output. The indentation changes based on the nesting of the includes.

like image 142
Mike O'Connor Avatar answered Nov 21 '25 12:11

Mike O'Connor


Try out Boost.Wave. It is straight forward to dump all the headers included. They also have an example named list_includes that does exactly that.

like image 36
Yakov Galka Avatar answered Nov 21 '25 12:11

Yakov Galka