[Lazarus] Bug 0022814: fpc executable's path should be relative if fpc is present in the env path

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Sep 6 14:26:13 CEST 2012


patspiper <patspiper at gmail.com> hat am 6. September 2012 um 13:58 geschrieben:
> http://bugs.freepascal.org/view.php?id=22814
>
> To launch the IDE, I use a script that lets me select the FPC version
> and then:
> -----------------------------
> export PATH=/home/me/Programs/fpc/$FPC_VER/lib/fpc/$FPC_VER:$PATH

Why the above path?


> export PATH=/home/me/Programs/fpc/$FPC_VER/bin:$PATH
> export PATH=/home/me/Programs/fpc/crossbinutils/bin:$PATH
> cd /tmp
> /home/supra/Programs/lazarus/lazarus-svn/startlazarus
> --pcp="/home/me/Programs/lazarus/config-lazarus-svn" ${CMD_LINE_PARAMS}
> -----------------------------
>
> $FPC_VER is 2.6.1 or 2.7.1 for example.
>
> CMD_LINE_PARAMS is for debug purposes
> ("--debug-enable=DBG_CMD_ECHO,DBG_STATE,DBG_DATA_MONITORS,DBGMI_QUEUE_DEBUG,DBGMI_TYPE_INFO
> --debug-log=/tmp/laz.log")
>
> An FPCVER dropdown list in the IDE options could be a solution (Changing
> it must trigger the rescan FPC source directory in case it is affected
> by the version change). However, will fpc be able to locate ppc386 (the
> actual compiler)?

Changing the the compiler in the IDE triggers a rescan of the compiler, which
updates the FPCVer macro. If the path to the FPC sources contains the macro
FPCVer the IDE switches to it. If this directory was not yet scanned it will be
scanned now. The IDE has a cache for multiple compilers and multiple FPC source
directories.

You can switch the compiler by using the combobox in the project's options or by
using build modes.


> Are there fpc executables other than fpc and the actual compiler needed
> by the IDE?

Yes. What exactly depends on your program. For example fpcres is commonly used.
These tools are called by the compiler, not the IDE.


Mattias




More information about the Lazarus mailing list