C++ find out needed parts of code

c++

Solution

Not an automatic solution, but I used doxygen Graph feature to build dependency tree for project class : doxygen doc on the subject

Problem

I have a really huge solution in VS2010 C++ with several projects, and I only want to keep those parts that are actually needed. It is difficult because some parts of one project need other parts of other projects. Does anybody know how I could automatically remove those parts of the code that are not called when I run the application, perhaps using an add-on for VS2010 or so? I guess this is a rather unusual wish, but perhaps somebody knows a solution anyway. Thank you.

Original source