[Lazarus] Switching Lazarus between fpc 3.2.0 and 3.0.4 - how to?

Bo Berglund bo.berglund at gmail.com
Sun Jul 5 10:40:11 CEST 2020


On Sun, 5 Jul 2020 01:44:27 -0500, "Jesus R. via lazarus"
<lazarus at lists.lazarus-ide.org> wrote:

>El dom., 5 jul. 2020 a las 0:47, Bo Berglund via lazarus (<
>lazarus at lists.lazarus-ide.org>) escribió:
>
>> But I cannot find any setting for compiler in
>> Project/Project_Options/Compiler_Options/Build_Modes
>> I only see these items there:
>> - Other unit files
>> - Include files
>> - Libraries
>> - Unit output directory
>> - Target file name
>> - Apply conventions (a checkbox)
>> - Other sorces
>> - Debugger path addition
>
>
>See Project/Project_Options/Compiler_Options/compiler_commands in the
>compiler section there is a combo box for the compiler command, by default
>it shows "$(CompPath)", but you can specify any compiler you wish for the
>current build mode, just select it from the list (I guess this list is
>filled with the Most Recent Compiler List used in
>Tools/Options/Enviroment settings).

In Lazarus 2.0.10 at least this does not exist and is my main concern
here. There simply is no item in this dialog concerning the compiler,
so your compiler_commands cannot be changed.

LATER:
------
It turns out that in the left side tree view when opening
Project/Project_Options the node Compiler_Options is shown at the very
bottom but it cannot be expanded by clicking the leading arrow so only
the first page is shown.

By accident I double-clicked the title "Compiler Options" and then it
expanded and showed a lot more possible options:
- Paths
- Config and Target
- Parsing
- Compilation and linking
- Debugging
- Verbosity
- Messages
- Custom options
- Additions and overrides
- Compiler commands

So only the Paths property page was shown before and the one you refer
to was invisible....

Now I will go ahead and create a new build mode with the fpc set to
3.0.4 and see what happens.

Question:
If I create a new build mode and save it and then move over to the
Tools menu and set some items there, vill it be saved into the new
build mode while keeping the old settings in the default build mode?

I.e. if one create a build mode below the project settings will it be
a globally available build mode or just specifically for the currently
loaded project?
I don't want to damage the default in any case.

>If you have to switch compilers frequently, everybody has his/her
>preferred solution, here is mine :)
>
>Just by switching the compiler and rebuilding your project  Lazarus will
>probably want to recompile the LCL and all its dependencies which means
>overwriting the ppu and o's files compiled with by the previous compiler,
>and as it happens sometimes this require a cleanup (see run->cleanup and
>build).
>But even when a cleanup is not required this takes some time (and
>if your pc is like mine which still uses bulbs and gears, it usually means
>long time), so the solution is to edit the LCL package (and all it's
>package dependencies) and edit the package compiler options/paths/Unit
>Output Directory (-FU) so after the text "units" (or "lib" depending on the
>package) insert a \$(FPCVer) (or /$(FPCVer)) macro, in this way the first
>time that the compiler is switched the LCL and it's dependencies will be
>rebuilt into its own/specific compiler version directory, resulting in no
>more overwriting and faster compiling time.
>

I am a bit suspicious about this since Lazarus 2.0.10 is specificly
requiring fpc 3.2.0 to rebuild itself...
Can there really be a package set built with 3.0.4 in Lazarus 2.0.10?


-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list