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

Marco van de Voort marcov at stack.nl
Tue Jul 6 17:41:27 CEST 2010


In our previous episode, Hans-Peter Diettrich said:
> >> Sad but we found a new (really very old) bug with spaces: 
> >> http://bugs.freepascal.org/view.php?id=9964
> >>
> >> If you pass -o"some file with spaces.exe" or "-osome file with 
> >> spaces.exe" fpc generates only a file with only "some" part.
> [...]
> > Are you sure the bug is in FPC ? I mean, as far as I know there is nothing
> > that prevents the internal linker or option handling from having spaces 
> > in a
> > filename. However, if the options are passed as -osome file with spaces.exe
> > then FPC only sees the "some".
> 
> Right, the filename should be quoted.
> 
> I just found another annoying behaviour, namely that FPC cannot handle 
> relative pathes and macros in file specifications. When I want to add an 
> unit ../some.pas to a project or package, FPC doesn't find that file. In 
> the uses clause the "in 'some.pas'" only accepts absolute pathes 
> (useless) or files in the search path - no directory macros, no relative 
> names :-(
> 
> This should not be hard to cure, but I could not yet find out where. 
> Should I file an feature request?

Does Lazarus set the working directory for the compiler as you expect it to
be? Keep in mind that a relative path is always dependant on the working
directory, not relative to the project.

Many people using Delphi have made the same mistake.



More information about the fpc-devel mailing list