[Lazarus] Absolute paths on different platforms

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Jun 25 23:05:55 CEST 2011


On Sat, 25 Jun 2011 23:37:02 +0400
Max Vlasov <max.vlasov at gmail.com> wrote:

> Hi,
> 
> I found that Lazarus does a great job when one uses the same lpi/lpk
> on different platforms. I currently have one question. If a path for
> example to some library folder is absolute, I get obvious
> non-existence error with a text "...contains a non-existing directory"
> (for example when letter based windows paths used and I'm in linux and
> press ok in project options ). I should just choose Ignore when the
> message appear, but I suppose for a large project it can be tedious
> and if I wrongly choose cancel,  I can lose some information (although
> I can live with that). I know that I should avoid absolute paths, but
> sometimes it's hard to do.
> 
> I see two options (if either possible)
> - Ignore absolute paths from another platform (for example c:\src
> found in linux Lazarus). But I'm not sure whether it's always
> possible.
> - Introduce a setting to suppress this warning. I think if it becomes
> too tedious, I will be ready to switch this off completely. And it's
> much easier to implement that the first suggestion. I tried to find,
> maybe it's already there, but failed, sorry

Because linker paths are normally machine dependent, you can add
them to your fpc.cfg.

About warnings:
The IDE should warn about strange settings after you have
changed them or when someone else uses your package/project the first
time. The latter case is not that easy to find out, so this is not
really implemented.
Just clicking ok when you have not changed a path should not give a
warning.

About ignoring absolute paths:
Wrong search paths is the top reason for frequently asked questions.
That's why the warnings are there and the number of such questions have
dropped since these were added. We should not ignore absolute paths
in general. 

Supressing:
The IDE has a mechanism to not ask questions for periods
of time. For example asking a question only once per 24h or only once
per project or until the IDE is restarted. Maybe
this can be used for this. But I'm not sure about the parameters.


Mattias




More information about the Lazarus mailing list