[fpc-pascal] uses myunit in '../src/myunit.pas' ?

Marco van de Voort marcov at stack.nl
Sun Feb 12 16:17:01 CET 2017

In our previous episode, Lars said:
> I have found some use cases for hard coded paths in the source files..
> although these use cases are rare. I think even delphi main project DPR
> file does this, if I remember correctly, but I found other uses cases
> other than that.

I think that is the main reason, but that was for the IDE/designers benefit,
not the compiler's. Just like the form names are mentioned in comments in
the .dpr. 

Later the syntax was recycled to tackle file case problems on Kylix.

But the problem is what are relative paths relative too? Project file? The
actual source file?

>  One example might be when you are writing a quick program and don't want
> to send in a whole bunch of -Fu options and go into dialog boxes in
> lazarus configuring it, so you just quickly write it in your program
> ../someunit instead of configuring -Fu which can be obnoxious and
> tedious..  But that's just one use case.  Another use case, AFAIR was a
> build system instead of gnu make. 

IMHO these are all shaky uses cases, and actually doing it right is quite

More information about the fpc-pascal mailing list