[Lazarus] Changed Compilers Options, Run, Build versus Build All

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Dec 11 23:08:27 CET 2008


On Thu, 11 Dec 2008 22:33:21 +0100
Tom Verhoeff <T.Verhoeff at tue.nl> wrote:

>[...]
> Here is another issue.  When working on a program involving multiple
> units, it may turn out that the "Use AnsiStrings" was not set
> consistently.
> 
> Students are advised to enable this globally in the Compiler Options,
> but they sometimes forget.  Some (given/generated) units also contain
> their own {$H+}, others don't. 

Is this a student bug or an IDE bug?


> This may give rise to inconsistencies
> (usually flagged by the compiler, but not understood by beginners).
> 
> When you change Compiler Options later, and then do Run, the relevant
> unit may not be (re)compiled, because its source code did not change.
> One is required to do a Build All first.  But a beginner will not be
> aware of this.

Yes, that's why the IDE adds -B when the compiler parameters changed
(except for search path changes). 0.9.26 has this feature. 0.9.24 not.

 
> Is it possible to have the IDE suggest a Build All when doing Run,
> if the Compiler Options were changed after the previous build?

It does.
Please provide an example, where it does not work.


> Or even better have a three-way global setting:
> 
>   When doing Run and the Compiler Options changed after the previous
> build:
> 
>     *  Always do a Build All  <-- this would be better for beginners
>     *  Always ask to either Build or Build All (the latter as default
> choice)
>     *  Always do a Build   <-- this seems to be the current situation


Mattias



More information about the Lazarus mailing list