How reduce dll size again
My dll have been bigger multiplied up many times than early for some reason. I'm beginning to size up the situation:
- A source hasn't changed.
- Debug information everywhere turned off.
- Dll use package "Pack", but not include in Runtime Packages options.
- I've compared new dll with old version dll thought the instrumentality of PE Explore. In new dll I find out many modules with prefix 'ec' implicitly imported unlike old dll.
- Package "Pack" using ecControls components
- Dll doesn't using explicitly call to ecControls units.
Why ecControls units imported in dll? Have anybody some advice?
If a unit in ecControls is accidentally used, it's initialization section (if it has one) will be called and you can put a breakpoint in there to try and see where it is being called from. You can also put a breakpoint in System.InitUnits (with debug dcus on) to see if any unit in ecControls is being initialized.
I use this technique in Forms.pas when working on a dll to make sure that Forms.pas is not being linked in accidentally.
If your DLL is using a package that's not included in the Runtime Packages list, then its units will be implicitly imported into your DLL instead of linking to the runtime package. That's probably what's causing it right there. Try adding the package to your Runtime Packages list and see if the ecControls issue goes away.
Why you dont just rename the ecControls directory and rebuild (deleting the package first of course)? That will let you see exactly where it is being referenced.