[Lazarus] subversion mirror

Michael Van Canneyt michael at freepascal.org
Thu Apr 9 10:46:43 CEST 2009


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



More information about the Lazarus mailing list