I know your concern's.
And AIKSF, the member data's that are used, and only when they are used, will be optimized by FPC.
So, when I (you) don't use any function, that resides otherwise in a .dll or .exe, the binary code of the given member will not include into the final result.
That is a great issue of FPC !
But my test's would be, what is, when the used members are outsourced into packages or dynamical libraries ?
Under Windows, you have two options:
- you can use so called .def initions files, which helps you (with the dlltool) to form a import library (*.a) that can be used to say, which member is in which dll. Okay you have set extra options during/for the link time, so the linker LD.exe can resolve the references.
- you can use so called "external" directives under FPC, where you can mark a member as "extern", and you can labeled this external mark with a name, that is found in the dynamic library where the binary code for the member resides.
- or an other, third option would be, that all of your application's use a static library, which comes like the import libraries *.a.
But this option tend to grow down your computer memory, and waste space on your storage devices - becaus all the used member binary code is linking redundant. And the final result (either: *.exe, or *.dll) will be maintained a little bit uncomfortable.
On the one look: you have all members into the PE image file, but big memory waste.
On the other look: you are little bit more flexible, when you use .DLL file that share the memory of your .EXE application's that use this DLL. Because the used DLL is only one times loaded into the memory, and all EXE that use members multiple times, can get the data from one code base. It is on the next hand comfortable, that you can provide update DLL files, so you can have a core application, and the logic lay in one or more DLL.
This is the way, how modern Windows works.