[Lazarus] Exists a macro to FPC path to use at fpc.cfg file?

Michael Van Canneyt michael at freepascal.org
Mon Jun 21 17:25:43 CEST 2010



On Mon, 21 Jun 2010, Marcos Douglas wrote:

> On Mon, Jun 21, 2010 at 11:42 AM, Michael Van Canneyt
> <michael at freepascal.org> wrote:
>>
>>
>> On Mon, 21 Jun 2010, Marcos Douglas wrote:
>>
>>> I need use the sources of FPC/Lazarus in external HD. So, the FPC path
>>> is changed in differents computers.
>>> Is possible to use a macro to point to FPC path (in variable of
>>> system) at fpc.cfg file?
>>>
>>> eg:
>>>
>>> Instead this:
>>>
>>> -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/
>>> -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/*
>>> -FuC:\freepascal\fpc/$FPCVERSION/units/$FPCTARGET/rtl
>>>
>>> use this:
>>>
>>> -Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/
>>> -Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/*
>>> -Fu$FPCSOURCE/$FPCVERSION/units/$FPCTARGET/rtl
>>>
>>> I already use the PPC_CONFIG_PATH variable to fpc.cfg file. Would be a
>>> variable to FPC path...
>>
>> If the compiler does not recognize a variable, it will search for it in
>> the environment. So all you must do is set the variable in the environment.
>>
>
> Did not work.
>
> I created PPC_SOURCE_PATH variable at the system.
> PPC_SOURCE_PATH = c:\freepascal\fpc\2.5.1
>
> In fpc.cfg, I replaced:
> -Fu$PPC_SOURCE_PATH/$FPCVERSION/units/$FPCTARGET/
>
> Error on compile. The Lazarus not found the system unit... and I did
> not use the macro at Enviroment/Options of Lazarus. I replace only in
> fpc.cfg, for now.

Strange. 
Apparently it happens only when substituting the {$I %VARIABLE%}. 
I assumed it happens also in the config file :/

Well, maybe this is an easy-to-implement feature :-)

Michael.




More information about the Lazarus mailing list