[Lazarus] Project LPI Files and Platforms

Mattias Gaertner nc-gaertnma at netcologne.de
Mon May 18 07:35:48 CEST 2009

On Sun, 17 May 2009 07:31:33 -0400
Mehmet Erol Sanliturk <sanliturk at ttmail.com> wrote:

> I could be able to generate the errors I have mentioned in my first 
> message .
> Those errors are caused by paths stored into LPI files about user 
> program when compilation in Windows requires them or perhaps 
> unnecessarily specified in IDE by the user .
> When such an LPI file is loaded by Lazarus in another operating
> system it is giving an error message about a Lazarus supplied unit is
> not found instead of saying a path is encountered which does not
> exist in this platform .

The unit search path contains absolute file names.

In this specific case:

The first two paths are unneeded, because the project already uses the
LCL package, which adds the paths automatically.
The last two paths are pointing into the FPC source directories.
This is only useful if you are working on the FPC units.
Otherwise it can create conflicts, if your FPC sources and installed
units do not fit exactly.

The IDE does not shorten automatically the unit search path because
absolute path names are needed for machine dependent projects.

If you want platform independent search paths use 
or relative file names 
or macros like $(LazarusDir) or $(FPCSrcDir).

See here for the complete list:

> As a conclusion I may say that the paths themselves should be checked
> at points where they are given .

Maybe a warning should be issued when absolute file names are filled
into the search paths.


More information about the Lazarus mailing list