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

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Jul 7 15:42:10 CEST 2010

Mattias Gärtner schrieb:

>>> 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).

In the concrete case the filename was all lowercase, and the Windows 
filesystems are case-insensitive.

>> 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.

Unfortunately I have to replace some files in the compiler directory, 
what suggests *not* to add that directory to the searchpath - otherwise 
I suspect that a used unit could be found in the wrong directory.

Perhaps somebody has a better solution?

> 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.

I understand the complications in Lazarus, but not in FPC with a single 
(unique) working directory :-(
That's why I ask in the FPC list.


More information about the fpc-devel mailing list