[Lazarus] Free Pascal 2.4.2 released!

Sven Barth pascaldragon at googlemail.com
Sun Nov 14 21:00:20 CET 2010

On 14.11.2010 20:25, Bo Berglund wrote:
>> C:\Programs\lazarus\>
>> C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all
>> FPC=Some\Other\Dir\With\fpc.exe
> OK, that is the info I needed to know, but meanwhile I have been told
> that there also exists a lazarus "configuration" in %APPDATA% and that
> this contains a specifier on which compiler to use.

This setting is only used when you compile an application inside Lazarus 
or you compile the IDE within the IDE. If you use make the mechanisms I 
described are used.

> If this is the case then this location is not lazarus install specific
> and not fpc install specific either so it makes life much harder to
> have different versions available at the same time...
> I guess that Microsoft decided tha we can have only one single version
> of a program installed on Windows at a single time. :-(

This isn't a decision done by Microsoft, but by the Lazarus team.

> And now my problem is to find out if this configuration setting is
> used by the command line rebuild of lazarus or only if the rebuild is
> started from within lazarus...
> Anyone knows the answer to this?

I believe I've already sent you that today ^^

You need to launch Lazarus with an additional command line parameter: 
--pcp or --primary-config-path. This will tell Lazarus to use the path 
you specify there as the configuration path instead of "%APPDATA%\lazarus".


lazarus.exe --pcp=C:\configs\lazarus\\

You can also specify this for the shortcuts on the desktop or in the 
startmenu. Click on them with the right mouse key and go to "Settings" 
(or "Properties", I don't know what it's called in an English Windows). 
Then their is a edit box that's labeled "target" or similar and should 
contain your path to Lazarus (e.g. C:\Programs\lazarus\lazarus.exe). 
There you just append the pcp option like above. Then press OK and 
double click the shortcut. :)

>> If you have used the installer for 2.4.2 the path
>> "C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32" should already be in
>> %PATH% (and thus you could also just use "make" without the path...).
> I inspected the path by reading it on the command line, but there was
> no trace of fpc (not 2.4.2 and not 2.2.4 from the lazarus installation
> either).
> This lack of path info previously forced me to use the full path to
> make.exe because otherwise the make that would be picked up was the
> one from my BDS2006 installation, which is on path.
> I got this advice when I wanted to rebuild a broken lazarus.
> Now I looked in ControlPanel/System/Advanced/Environment and I can see
> the added path, but it was done to the SYSTEM path, not the USER path.
> The difference between thies is very profound, anything added to USER
> path will be available to any application that is started after the
> setting has been done, but in order to get the SYSTEM path changes
> activated you need to restart Windows....
> That is why I don't have fpc 2.4.2 on my path yet.

Ehm... no. In the last few weeks I've worked on my system PATH very 
often and I never restarted Windows. You just need to restart the 
applications that use the PATH, because their environment settings are 
fixed once they've started (and no, you don't need to restart 
explorer.exe). So if you have a command window open and you change the 
PATH in the Control Panel then you need to close that command window and 
start it again. Just try it :)

As a side note: it seems that either make or Windows look for 
executables in the directory where make is located. Thus when you use 
the make in your 2.2.4 dir it uses the 2.2.4 compiler and if you use the 
make in your 2.4.2 dir it will use the 2.4.2 compiler. This changes of 
course if you explicitly specify a compiler using the FPC or PP variable 
when calling make...


More information about the Lazarus mailing list