The problem with dependency generators is that they only tell you which headers are included, not which are needed.
If I included bitmaplib.h because I thought I needed a function from it, but I no longer use it, it will likely stay there til the end of time. Unused variables generate a warning, but unused libraries don't -- seems like a bug to me.
Unless your filesystem is set to noatime, you can check whether any file has been opened for read by comparing the access time output of stat before and after compiling. File system event monitoring that I've used is driven by changes to the filesystem and isn't triggered by reading a file, so wouldn't help you.
|