Is there a way to list, in a c++ program or a c# program, all the header files used by another c++ file (either dot.h or dot.cpp) ?
I found this question:
Is there a way to programmically traverse header files?
Its answer seems to be exactly what I am looking for – except for the fact that I am using Windows (Visual Studio 2010).
I would like to be able to use something like the gcc -M -MM -MF options (to get a list of dependencies, or at least header files, preferably with absolute path).
The alternative, parsing the files to find the #include pattern, is fairly uncertain; not to mention additional tasks to properly identify the files… So if there was a tool that could actually do this, it would be perfectly wonderful.
Is there any Windows (programming) c++ or c# command, or pre-processor command, that can list all the header files, or all the dependencies, of a program/ file (header or implementation, since sometimes include directives can exist in implementation files too) ?
I have considered VCCodeModel, but had a bit of trouble with it, so I ended up parsing the c++ files – it is a work in progress, since I am still looking for their dependencies, and it is very hard to find the absolute path names based only on the #include directories.
Will change my answer if I find a better option, or if anyone suggests one.