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

Jesus R. jesusrmx at gmail.com
Sun Jul 5 08:44:27 CEST 2020


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
> <https://lists.lazarus-ide.org/listinfo/lazarus>


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).

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.

Jesus Reyes A,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20200705/7078cf1d/attachment.html>


More information about the lazarus mailing list