[Lazarus] Using different FPC versions

patspiper patspiper at gmail.com
Mon Feb 10 20:05:07 CET 2014


On 10/02/14 20:43, Mattias Gaertner wrote:
> On Mon, 10 Feb 2014 19:24:18 +0100
> Sven Barth <pascaldragon at googlemail.com> wrote:
>
>> On 10.02.2014 19:20, patspiper wrote:
>>> On 10/02/14 20:09, Mattias Gaertner wrote:
>>>> On Mon, 10 Feb 2014 19:45:44 +0200
>>>> patspiper <patspiper at gmail.com> wrote:
>>>>
>>>>> [...]
>>>>> It allows the caller to specify the location (AFAIK it can be a relative
>>>>> path) of ppcxxx (the actual compiler). That option removes the need to
>>>>> rely on env variables to specify the fpc and ppcxxx paths. It would be
>>>>> enough to provide a qualified path in the IDE options for the fpc
>>>>> executable, and coupled with a -Xp field, it would allow fpc to locate
>>>>> the ppcxxx executable.
>>>>> ex: ./fpc -h -Xp../lib/fpc/2.6.3
> Note: The -Xp is relative to the current working directory. When
> compiling a project the cwd is the project directory. That means
> "../lib/fpc/2.6.3" won't work. You have to specify the full path
> -Xp/usr/lib/fpc/2.6.3.

That would be a snag as one won't be able to use the $FPCVER macro with 
the Xp switch. But come to think about it, it won't work anyway as it is 
ppcxxx that provides the fpc version, so using -Xp/usr/lib/fpc/$(FPCVER) 
will result in a catch 22 situation! :(

>
> The bad thing about -Xp is that if the directory does not exist, there
> is no error, no warning, no hint. fpc simply takes the default compiler.

I always avoid fpc stuff to be in the default PATH.

Stephano




More information about the Lazarus mailing list