Compile without linking

By default, the Informix® ESQL/C command processor preprocesses, compiles, and links the Informix® ESQL/C program and creates either an executable file or a DLL. To suppress the linking of your Informix® ESQL/C program specify the -c option. With this option, esql only preprocesses and compiles the code. The output of this command is a C object file (.obj extension) for each C source file (.c) or Informix® ESQL/C source file (.ec).

For example, to preprocess and compile the Informix® ESQL/C source file demo1.ec, use the following command:
esql -c demo1.ec
The preceding command generates a C object file called demo1.obj. The following esql command preprocesses demo1.ec, checks for Informix® extensions to X/Open-standard syntax, and suppresses warning messages:
esql -c -xopen -nowarn demo1.ec
Important: If you specify the conflicting options -c and -o, the preprocessor ignores the -o option and processes the -c option. The preprocessor reports the conflict in an error message.