[fpc-devel] Purpose of "uses ... in"?

Hans-Peter Diettrich DrDiettrich1 at aol.com
Mon Jul 12 10:12:37 CEST 2010


Jonas Maebe schrieb:

>> I know that the "in <filespec>" is part of the Delphi syntax, but
>> what is it really good for?
>> 
>> AFAIK it's not allowed to "rename" units this way, and since
>> (currently) only absolute filenames are implemented,
> 
> That is incorrect. Relative file names do work. They are resolved
> relative to the current working directory of the compiler.

Clarification:

When I start compiler\prep.lpi from Lazarus, the current directory is 
set to compiler\i386\, that's why compiler\prep.pas is not found.

After several tries and discussions I found that this is just the 
directory of the *executable*, not of the project. This is documented 
behaviour, but one must understand the difference between the Lazarus 
IDE working directory (project) and the runtime working directory 
(executable).

Sorry for the confusion :-(

DoDi




More information about the fpc-devel mailing list