Include and Dependancy Checker
-
Hi all, I'm currently involved on a C++ project (using .NET 2003) which is taking much too long to build. I believe this is due to uneccessary #include dependancies (i.e. headers included which are not needed by the code in that file, or a where a pre-declaration would do). Does anyone know of a tool which can analyze the code and point out these errors? Cheers, DAve (P.S. I must add I inherited the code... Its not my fault :))
-
Hi all, I'm currently involved on a C++ project (using .NET 2003) which is taking much too long to build. I believe this is due to uneccessary #include dependancies (i.e. headers included which are not needed by the code in that file, or a where a pre-declaration would do). Does anyone know of a tool which can analyze the code and point out these errors? Cheers, DAve (P.S. I must add I inherited the code... Its not my fault :))
There's one right here on CP: Include File Hierarchy Viewer[^] --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ----
-
There's one right here on CP: Include File Hierarchy Viewer[^] --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ----
Cheers for that, This will indeed show the include heiarachy, which is a great place to start for a manual search. The problem is I was looking for something a little more complex. What I would like is a tool that would look at the include files listed in a CPP and indicate if the included file is actually not needed. Or where a header is included in another header where a predeclaration could be used instead. i.e.
#include "cBar.h" class cFoo { cBar *mValue; }
Should be...class cBar; class cFoo { cBar *mValue; }
DAve