Alexey S. Smirnov schreef: > Florian Klaempfl пишет: >> This could be simply the influence of a different memory layout of the exe. >> > It seams that I was wrong. So. Lets do next small test. > The main program is: > |program small_test; > {$mode objfpc}{$H+} > > uses > Unit1; > begin > Print_Hello_Word; > end.| > > Uni1.pas is: > |Unit unit1; > {$mode objfpc}{$H+} > Interface > Uses > Graphics, SysUtils; > > Procedure Print_Hello_Word; > > Implementation > Procedure Print_Hello_Word; > Begin > WriteLN('Hello, word! Value is: '+IntToStr(23)); > End; > end.| > > As you see - Graphics unit is really unused here. >
No, the initialization section of the graphics unit and its dependencies is used. The lesson is: you cannot smart link away initialization (and finalization) sections of a unit. Vincent _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus