[Lazarus] Conditional compilation depending on Lazarus version?

Reinier Olislagers reinierolislagers at gmail.com
Thu Mar 22 12:14:40 CET 2012


On 22-3-2012 11:57, Sven Barth wrote:
> Am 22.03.2012 11:32, schrieb Reinier Olislagers:
> The revision is not possible (when using development versions you should
> try to use the latest revision), but for version you can use the unit
> LCLVersion. Just add it to the uses clause and then you can use e.g.:
> 
> {$if lcl_fullversion>=93100}
>   // code that should work with 0.9.31 or newer
> {$endif}
> 
> Just take a look at the unit to see which constants are supported (Note:
> it makes use of the feature that constants can be used in compiler
> conditionals)

Great, thanks, that works!




More information about the Lazarus mailing list