Explicit Invocation

If you wish to call qld with other options than those described in sap-srs-qld-iin, use qpc -c and then call qld explicitly. The -c option to qpc causes qld to stop after generating an object file, rather than continuing and calling the linker. The object file will be called a.o (UNIX) or a.obj (Windows) by default; this can be overridden with the -o option. Then you can make your own call to the linker; this call must include any needed object-files and libraries.

One reason you might wish to do this is to avoid the use of shared object files and shared libraries in a runtime system that is to be delivered on a different machine. See sap-rge-sos for more information on this and an example.

The steps taken by qld -- as illustrated in the above figure -- are as follows:

  1. Link all the specified QOF files together with either the Runtime Kernel or Development Kernel. The result of this phase is a temporary QOF file.
  2. "Consolidate" the temporary QOF file into a temporary object file using the subsidiary program qcon.
  3. UNIX: Call the C compiler to build an executable file. The command, which is echoed to standard output if the -v option is specified, resembles:
              % cc [-v] [-o output-file] runtime-directory/qprel.o temp.o
                            object-files runtime-directory/libqp.a
              

    The file runtime-directory/qprel.o is the Development Kernel object file. If you are linking to a Runtime Kernel qprel.o will be replaced by qprte.o in the above command. temp.o is the output of Step 2. libqp.a is the Quintus C library.

  4. Windows: Call the C compiler, cl to build an executable file. The form of the link command, which is echoed to standard output if the -v option is specified, resembles:
              % link [-v] [-o output-file] temp.obj
                          runtime-directory/qpeng.lib runtime-directory/qprel.lib
                          [runtime-directory/libpl.lib] object-files
                          runtime-directory/libqp.lib
              

    The file runtime-directory/qprel.lib is the Development Kernel object file. If you are linking to a Runtime Kernel qprel.lib will be replaced by qprte.lib in the above command. temp.obj is the output of Step 2. libqp.lib is the Quintus C library.

For a complete summary of all the possible options to qld, see too-too.