Default compilation order
After you have created the Informix® ESQL/C program file, you run the esql command on that file. By default, the Informix® ESQL/C preprocessor runs first and translates the embedded SQL statements in the program into Informix® ESQL/C function calls that communicate with the database server. The Informix® ESQL/C preprocessor produces a C source file and calls the C compiler. The C compiler then preprocesses and compiles your source file and links any other C source file, object file, or library file the same way as any other C program. If esql does not encounter errors in one of these steps, it generates an executable file. You can run the compiled Informix® ESQL/C program as you would any C program. When the program runs, it calls the Informix® ESQL/C library procedures; the library procedures set up communications with the database server to carry out the SQL operations.