Invoking qpc, the Prolog-to-QOF Compiler

There are two main ways to invoke qpc:

     % qpc -c P1.pl,...,Pn.pl  (A)
     
     % qpc [-D] [-o output-file] P1.pl,...,Pn.pl   (B)
     

(A). Invoking qpc with the -c option, means "compile to QOF and stop"; it simply produces a QOF file for each source file, as shown in the above figure.

(B). Invoking qpc without specifying -c compiles all the sources to QOF and then calls qld to build an executable file corresponding to those sources. -D tells qld that the program is to be linked with the Development Kernel rather than the Runtime Kernel. -o specifies a name for the executable file to be built by qld. Defaults to a.out. The -D and -o output-file options are passed on to qld if they were specified in the qpc command line.

Please note: .pl extensions may be omitted in the qpc command line (provided that there is not another file with the same name and no extension.) Also, the Prolog files need not have .pl extensions. If a Prolog file does not have one, the name of the corresponding object format file is simply the name of the Prolog source file extended with .qof. Otherwise, the name of the corresponding object format file is the name of the Prolog source file with the .pl extension replaced by .qof. Source files may be specified as absolute or relative filenames; each QOF file goes in the same directory as its source.

Further options allow you to run qpc in a verbose mode, to specify initialization files or add-ons, to customize the library search path, or make certain predicates invisible to the debugger.

For a summary of all the options to qpc, see too-too-qpc.