[fpc-pascal] uses in '' relative paths
Ryan Joseph
genericptr at gmail.com
Thu Oct 8 17:59:20 CEST 2020
> On Oct 7, 2020, at 11:15 AM, Ryan Joseph <genericptr at gmail.com> wrote:
>
> Some interesting stuff here, thanks. Almost there but for some reason Scanner.pas is not found even though it's in the same directory as TOMLParser.pas. The compiler did find TOMLParser despite /sources not being explicitly included as -Fu option.
>
>
> unit TOMLParser;
> interface
> uses
> Classes,
> Scanner, // error: Can't find unit Scanner used by TOMLParser
> TOMLTypes;
what does {$unitpath sources} do exactly in the file below? I assumed it added /sources to the directory the current file is in and then added that to the unit path like -Fu. If I omit the "in" part it still finds the units in /sources BUT then units in /sources can't find out units in /sources. For example TOMLParser can't find TOMLTypes even though they're in the same directory.
{$mode objfpc}
{$unitpath sources}
unit TOML;
interface
uses
TOMLParser,
TOMLTypes;
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list