Ylisar
Ylisar

Reputation: 4291

Overview look of header inclusions

When a project grows it becomes hard to get an overview of header inclusion. I've noticed our object files have grown rather large and so I'm thinking there's a lot to be won by rearranging dependencies. This is where the problem begin, I know of no convenient way to actually get an overview on what headers actually get included for a specific source file. There's the possibility of outputting the pre-processed source files, that however creates huge files with loads of irrelevant information. I'm thinking there must be a tool for this, but I can't seem to find any. I'm on windows, so in case anyone know of a good tool / way to actually do this for windows I'd be eternally grateful.

Upvotes: 0

Views: 160

Answers (3)

WildCrustacean
WildCrustacean

Reputation: 5966

doxygen makes nice #include file dependency graphs too, if you want to see how all your headers fit together.

Upvotes: 0

Jan Hettich
Jan Hettich

Reputation: 9886

This isn't a tool, but lays out some basic principles for good design of header file #includes:

http://www.eventhelix.com/realtimemantra/headerfileincludepatterns.htm

Upvotes: 0

Georg Fritzsche
Georg Fritzsche

Reputation: 99092

Visual C++ has the /showIncludes switch, which causes the compiler to output a message when an include is encountered.

Upvotes: 4

Related Questions