Linking thread-safe Informix general libraries to an ESQL/C module in a Windows environment

To create a thread-safe IBM® Informix® ESQL/C application, you must perform the following steps:

  1. In your Informix ESQL/C source file, include the appropriate thread functions and variables of the Windows API. For more information about threads, consult your Microsoft or Borland programmer documentation.
  2. When you compile the Informix ESQL/C source file, specify the -thread command-line option of the esql command.

    The -thread option tells the Informix ESQL/C preprocessor to generate thread-safe C code when it translates SQL and Informix ESQL/C statements. This thread-safe code includes calls to thread-safe functions in the Informix DLLs.

If you are not creating the Informix ESQL/C application with threads, omit the -thread option. Although the Informix DLLs are thread safe, your non-thread-safe application does not use the thread-safe feature when you omit -thread.


Copyright© 2019 HCL Technologies Limited