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

Lars noreply at z505.com
Sun Feb 12 08:07:49 CET 2017


On Sat, February 11, 2017 5:56 am, Fred van Stappen wrote:
>
> Unit names are considered to be unique, so strictly, for the compiler
> there is no need to specify the path explicitly in code when the unit path
> is given to the compiler when calling it from the command line.
>
> To do this, use the -Fu parameter when calling fpc to include ../src to
> the unit path.
>
> Greetings,
> Tim Veldhuizen.
>
>

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



More information about the fpc-pascal mailing list