Re: [fpc-pascal] Minimal size of compiled library (DLL under Windows)

2021-04-06 Thread Jonas Maebe via fpc-pascal
On 2021-04-06 12:22, LacaK via fpc-pascal wrote: May be, that important word is here "referenced" code. Once some code (procedure, class) is referenced then this code is linked / included. It does not play role if it is really required by program / library ... right? It is impossible for a

Re: [fpc-pascal] Minimal size of compiled library (DLL under Windows)

2021-04-06 Thread LacaK via fpc-pascal
May be, that important word is here "referenced" code. Once some code (procedure, class) is referenced then this code is linked / included. It does not play role if it is really required by program / library ... right? L. So we see that classes like TComponent and also interfaces are

Re: [fpc-pascal] Minimal size of compiled library (DLL under Windows)

2021-04-06 Thread Jonas Maebe via fpc-pascal
On 06/04/2021 09:33, LacaK via fpc-pascal wrote: > So we see that classes like TComponent and also interfaces are touched, > but they are used only in conjuction with initilizing some global > variables like InitHandlerList, GlobalNameSpace. > > But these variables are never used in my library.

Re: [fpc-pascal] Minimal size of compiled library (DLL under Windows)

2021-04-06 Thread LacaK via fpc-pascal
I am guessing, that there must be something in initialization sections of units (SysUtils and Classes), which cause that some code is included, right? Can I somehow to avoid this grow of size (for example I need from Classes only TFPList)? Not in an easy way at the moment, I don't expect

Re: [fpc-pascal] Minimal size of compiled library (DLL under Windows)

2021-04-03 Thread Sven Barth via fpc-pascal
LacaK via fpc-pascal schrieb am Sa., 3. Apr. 2021, 13:22: > Hi, > I did small test project for library: > (with -CX -WR -O3 -Xs -XX options set) > > library library1; > {$mode objfpc}{$H+} > uses > SysUtils, Classes; > begin > end. > > Compilation produces DLL with size 200+ KB. > > When in

Re: [fpc-pascal] Minimal size of compiled library (DLL under Windows)

2021-04-03 Thread Marco van de Voort via fpc-pascal
Op 2021-04-03 om 13:22 schreef LacaK via fpc-pascal: I am guessing, that there must be something in initialization sections of units (SysUtils and Classes), which cause that some code is included, right? Can I somehow to avoid this grow of size (for example I need from Classes only

[fpc-pascal] Minimal size of compiled library (DLL under Windows)

2021-04-03 Thread LacaK via fpc-pascal
Hi,I did small test project for library:(with -CX -WR -O3 -Xs -XX options set)library library1;{$mode objfpc}{$H+}uses  SysUtils, Classes;beginend.  Compilation produces DLL with size 200+ KB.When in uses is only SysUtils then size is under 100 KB.Whene there are not units in uses clause then size