Previous Topic

Next Topic

Issuing Separate Commands for Precompiling, Compiling, and Linking

Alternatively, the following sequence of commands generates the same executable and illustrates how you can combine options and commands:

esqlc +T rep1.pc
cc -c rep1.c
esqlc +T rep2.pc
cc -c rep2.c
esqlc -o report rep1.o rep2.o
  • The esql +T commands specify a single embedded SQL source file. The +T precompiler option generates the C source code but suppresses automatic invocation of the C compiler.
  • The cc -c commands explicitly invoke the C compiler and specify the C source-code file from the corresponding esql +T command. The -c compiler option generates an object file but suppresses linking.
  • Finally, the esql -o command specifies both the object files generated by the preceding cc -c commands. It does not actually invoke the precompiler, but passes the object files to the C compiler. The -o option is a C compiler option that names the executable.