Macros and Conditionals

From Lazarus wiki
Revision as of 14:41, 30 September 2010 by Mattias2 (talk | contribs) (New page: =Overview= Macros can be used in search paths and file names to let the IDE automatically adapt them to the target platform. '''Build macros''' are project/package specific macros. A prom...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Overview

Macros can be used in search paths and file names to let the IDE automatically adapt them to the target platform. Build macros are project/package specific macros. A prominent example is the LCLWidgetType, which is defined by the package LCL and allows to choose the used widget set (carbon, gtk, qt, win32, wince, ...).

Conditionals allow to set macros depending on the target platform and/or other macros. For example you can use them to define special linker options when compiling for Mac OS X. They use a pascal like scripting language allowing to define even complex rules.

You can set the build macros and conditionals for a package via package editor / Compiler Options / Build Macros.

You can set the build macros and conditionals for a project via Project / Project Options / Compiler Options / Build Macros.

Build macros and conditionals exist since Lazarus 0.9.29.