My main package of custom controls I wrote in Delphi 6 is extremely large with many units including other units and so on. I am trying to figure out which unit source file is responsible for implicitly importing a particular unit into the package. The only information the compiler gives me is the standard 'Unit {unit name} implicitly imported into package {package name}', which sadly does not tell the name of the unit that forced the import. Does anyone know of a tool or a technique to quickly pinpoint the unit responsible?
Try finding the implicitly imported unit and renaming it. (Make sure to clear all your DCUs too or this won't work.) When the compiler tries to build the unit that's using it, it won't find it and it will give you an error showing exactly where it's being used.
GExperts has a "Project Dependencies" function. You click on a Unit and it will tell you which Units use that Unit. It also has an "indirect dependencies" function, which will tell you all the Units a Unit requires, even indirectly.
GExperts can be downloaded for free here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With