File Search Paths and qld

When a directive such as (A), below, is encountered by qpc, it notes that the QOF file being produced has a dependency on basics.qof in the library. The dependency is not stored as an absolute filename, so that when (B) is called (recall that the -d option causes qld to pull in all the dependencies of the specified QOF files), basics.qof will be sought wherever the current libraries are located. These need not be in the same place as at compilation time; in particular the QOF file may have been moved to a different machine.

     :- ensure_loaded(library(basics)).    (A)
     % qld -d ...    (B)

The -L option of qpc and qld allow prepending library directory definitions to the already existing ones. The -f and -F options perform similar functions but are more flexible than -L: -f appends a file search path definition to the already existing set, while -F prepends a file search path. A -f option, as exemplified in (C), corresponds to a file_search_path/2 call, (D). In such calls, path can itself be a file search path, as in (E).

     -f pathname:path     (C)
     file_search_path(pathname, path)    (D)
     -f "mypath:library(mypackage)"      (E)

For more detail on these options, see too-too.