Precompiling the application

The format of the command to precompile a source program is:

cpre
     [-Ccompiler] 
     [-Ddatabase_name]
     [-Ffips_level]
     [-G[isql_file_name]] 
     [-H]
     [-Iinclude_path_name] 
     [-Jcharset_locale_name] 
     [-Ksyntax_level]
     [-L[listing_file_name]]
     [-Ninterface_file_name]
     [-Otarget_file_name] 
     [-Ppassword] 
     [-Sserver_name] 
     [-Ttag_id] 
     [-Uuser_id] 
     [-Vversion_number] 
     [-Zlanguage_locale_name]
     [@options_file]...
     [-a] [-b] [-c] [-d] [-e] [-f] [-h] [-l] [-m] [-p] [-r] [-s] [-u] [-v] [-w] [-x] [-y]
     filename[.ext]

program is the name of the Embedded SQL/C source file. The default extension for program is “.cp”. cpre generates an output file with a “.c” extension.

Note64-bit applications The precompilers for 64-bit applications are cpre64 and cpre_r64. The cpre64 precompiler is the non-reentrant precompiler, and the cpre_r64 is the reentrant version. These precompilers can be used on any 64-bit platform supported for Open Client and Open Server.

Some of the options are switches that activate features of the precompiler. For example, an option can generate a stored procedure. These features are “off” by default, and are turned “on” by including the option on the cpre command line. Other statement qualifiers specify values for the preprocessor—a password, for example. Enter the value after the option (with or without intervening spaces).

If you enter an invalid option, the precompiler lists the options that are available.

See Appendix A, “Utility Commands Reference,” for detailed descriptions of precompiler options.