You may have noticed that when using Visual Studio 6.0's resource editor, it doesn't do a great job of keeping your resource files clean. If you delete a resource from the editor, it doesn't usually delete the associated
#define in your resource.h. While this isn't a huge problem (unless you are running out of constants in the valid ranges), it has always bugged me. I wrote a Perl script which will look at your .dsp, parse though the associated source files, and try to match the constants defined in your Resource.h file. Any constants that are not matched will be written to an output file Orphans.txt.
- You must have Perl installed.
- Call using:
> Perl FindOrphanedResources.pl <full path to dsp> [<Resource.h file>="Resource.h"]
Possible problems: I realize that files not included in the DSP may be using the constants defined in the Resource file. Since I couldn't think of any good way to find all the files that
#include (somewhere down the chain) the resource.h file, I stuck with just those in the DSP. You may want to verify that the constants identified are truly not being used by any files in your projects. This script will at least narrow down the list for you.