[fpc-pascal] fpc.cfg on windows

Sven Barth pascaldragon at googlemail.com
Sun Oct 10 16:41:17 CEST 2010


On 10.10.2010 15:30, Bernd Kreuss wrote:
> On 10.10.2010 13:54, Sven Barth wrote:
>
>> In trunk version of Lazarus you can set a configuration as "default for
>> new projects".
>
> [OT] If the same option that can put an @extracfg.cfg on a per project
> basis would also be implemented in Lazarus' environment options to put
> another @globalextracfg.cfg behind it for *all* projects, this would be
> nice and provide enough flexibility.
>

Then what about creating a feature request? :)

> [On-Topic again] Can multiple @someconfig.cfg options be chained on the
> command line and it will then include them all in this order (I admit I
> am too lazy to try this now but I suspect this is possible)?

I just tested it. You can do that, but the order might be important 
(depends on the options you use). I did the following test on a 
i386-linux system:

==== fpc1.cfg ====
-Twin32
====

==== fpc2.cfg ====
-Fu/mnt/data/applications/fpc/2.5.1/lib/fpc/2.5.1/units/$fpctarget/rtl
====

==== call 1 ====
fpc -n @fpc1.cfg @fpc2.cfg test.pas
====

==== call 2 ====
fpc -n @fpc2.cfg @fpc1.cfg test.pas
====

In call 1 FPC compiles test.pas successfully as a Win32 application. In 
call 2 FPC raises an error, because fpc2.cfg is read first and while 
reading the $fpctarget is replaced with "i386-linux" (the current 
target) and then fpc1.cfg is set where the target is set to Win32. Thus 
compiler searches in the i386-linux unit directory for i386-win32 ppus 
(and thus complains that system.pp was compiled for the wrong target).

Regards,
Sven



More information about the fpc-pascal mailing list