[Lazarus] Lazarus Release 2.2.6

Kostas Michalopoulos badsector at runtimeterror.com
Thu Mar 16 20:21:09 CET 2023

On 3/16/23 19:46, Bo Berglund via lazarus wrote:
> But it also seems like on each system there is only one version of fpc that can
> be "active" (at least on Linux) because its config is stored outside of the pcp
> dir in a user global fashion.
> How can I make the fpc compiler versions co-exist and be recognized by the
> respecive versions of Lazarus?

You can tell Lazarus which binary to use for FPC.

For the config file, you can use the same for all. The ~/.fpg.cfg is 
just a text file containing parameters to give to the compiler, same as 
the command like, but with some additional preprocessing. You can use 
something like

#IFDEF VER<FPC version>
parameters just for that FPC

But note that the default configuration should work fine with most FPCs 
as long as they are installed in the same prefix since they use 
$fpcversion and $fpctarget macros instead of hardcoding things. For 
example personally i have both stable and git versions of FPC installed 
in ~/Apps/fpc for various targets and each uses its own set of units, etc.

If you have FPCs placed in different prefixes you might need the IFDEF 
for those though - or perhaps just add directories for both prefixes and 
as long as the $fpcversion macro is used for the units it'll work.


More information about the lazarus mailing list