[fpc-devel] Another bug with spaces in fpc (windows)

Mattias Gärtner nc-gaertnma at netcologne.de
Wed Jul 7 12:14:36 CEST 2010


Zitat von Hans-Peter Diettrich <DrDiettrich1 at aol.com>:

> Mattias Gaertner schrieb:
>
>> Lazarus sets the working directory to the project directory when
>> calling the compiler.
>
> Fine :-)
>
>> The 'in' modifier works here.
>
> It didn't work for me with relative pathes, like
>   uses myUnit in '..\myUnit.pas';
> (Windows, obviously ;-)

Hint: Both compiler and lazarus automatically changes the path  
delimiter and searches exact/lower/upper case for the file name (not  
path).


> While Lazarus could find that unit, FPC could not :-(
>
> There might be a problem with "uses" in the project file, where "in"  
> is allowed, and with uses of the same file in other units?

The 'in' modifier is troublesome and is always the inferior solution  
compared to search paths.
Lazarus searches relative to the unit, the compiler relative to its  
working directory. The reason is that the IDE has not a single working  
directory, but each project, each package and each tool have their own  
working directories, so units can have 0..n different working  
directories.
Delphi uses the 'in' modifier mostly to mark units as part of the project.


Mattias






More information about the fpc-devel mailing list