Linking other C source and object files

You can list the following types of files on the esql command line to indicate that you want the link editor to link to the resulting object file:
  • C source files in the form otherCsrc.c

    If you list files with the .c extensions, esql passes them through to the C compiler, which compiles them to object files (.o extensions) and links these object files.

  • C object files in the form otherCobj.o on a UNIX™ operating system or otherCobj.obj in a Windows™ environment

    If you list files with .o or .obj extensions, esql passes them through to the C compiler, which links these object files. The link editor links the C object files with the appropriate library functions.

  • Library files, either your own libraries or system libraries that are compatible with the linker
  • Module definitions (.def)
  • Resource files, either compiled (.res) or uncompiled (.rc)
    Tip: If you specify uncompiled resource files, esql passes them to the resource compiler and links the resulting .res file to the application.
The command preprocessor passes these files directly to the linker. It also links the libraries it needs to support the function library. You can use the -libs option to determine which libraries esql automatically links, as follows:
esql -libs