views:

110

answers:

2

Possible Duplicate:
Tools to find included headers which are unused?

I would like to check useless header file in c++ files(.h and .cpp)

During developing, There are so many relations between files.

So it cause compile time more longer.

Can you tell me what's the tool that help me.

Thank you.

A: 

Have a look at the Dehydra.

From the website:

Dehydra is a lightweight, scriptable, general purpose static analysis tool capable of application-specific analyses of C++ code. In the simplest sense, Dehydra can be thought of as a semantic grep tool.

It should be possible to come up with a script that checks for unused #include files.

Ton van den Heuvel
A: 

I use lint, Verify the link, it does mention unused variables, unreachable statements and many more.

Narendra N
Isn't lint for C only?
Ton van den Heuvel