views:

84

answers:

2

I am porting a large, messy, 10 year old cold base in C++ from Metrowerks on OS X to XCode. There are so many files and all the other people that touched this over the years are gone. Nobody know what files are actually needed and which are just cruft.

Is there any tool that I could run and have it produce a list of what files are ACTUALLY needed?

A: 

You can try searching this static code analyzer list in Wikipedia. The ones that I've seen in actions would be cppdep and Include Hierarchy Viewer, although the first one is a little rough and the latter is a Windows analyzer only for the include tree. Also that still might not give you all the info if the dependencies are not explicit.

Edit: Also, the following StackOverflow search query seems to have results that might interest you: http://stackoverflow.com/search?q=c%2B%2B+dependency

Kornel Kisielewicz
+1  A: 

You could run Doxygen on your project and have it generate inheritance diagrams for your classes. It can also generate caller graphs to help you find dead code.

Eric Skroch