Implicit options invoked by the esql preprocessor in Windows environments

The command processor implicitly passes compiler and linker flags to the supported C compilers. The following table lists the implicit options that esql passes when you use the indicated esql options. If you choose to create your own build file, use the indicated flags as appropriate for your application.
Important: The esql command does not implicitly pass any options to the resource compiler.
Table 1. Implicitly passed compiler options

The first column shows the compiler that applies to the columns to the right. The compilers are Microsoft™ Visual C++, Version 2.x and later or Borland C++, Version 5. The next two columns show the Module type, and esql options. The fourth and fifth columns show the Implicit options: Compiler and Linker.

Compiler Module type esql options Implicit options
Compiler Linker
Microsoft Visual C++, Version 2.x or later executable -target:exe

-we

-c -I%ONEDB_HOME%\incl\esql/D_systype/D_proctype/threadtype/DWIN32
-DEF:deffile -OUT:target -MAP 
-SUBSYSTEM:systype 
%ONEDB_HOME%\lib\isqlt09a.lib
%ONEDB_HOME%\lib\igl4g303.lib
%ONEDB_HOME%\lib\iglxg303.lib
%ONEDB_HOME%\lib\igo4g303.lib
libset
dll -target:dll

-wd

-c -I%ONEDB_HOME%\incl\esql/D_systype/D_proctype/threadtype/DWIN32
-DLL -DEF:deffile -OUT:target -MAP 
-SUBSYSTEM:systype 
%ONEDB_HOME%\lib\isqlt09a.lib
%ONEDB_HOME%\lib\igl4g303.lib
%ONEDB_HOME%\lib\iglxg303.lib
%ONEDB_HOME%\lib\igo4g303.lib
libset
Borland C++, Version 5 executable -target:exe

-we

-c -I%ONEDB_HOME%\ incl\esql-etarget-subtype-libtlog-libtlg
-c -Tpe -M
-DEF:deffile-subsystem
%ONEDB_HOME%\lib\igl4b303.lib
%ONEDB_HOME%\lib\iglxb303.lib
%ONEDB_HOME%\lib\igo4b303.lib
c0t32.obj
libset
dll -target:dll

-wd

-c -I%ONEDB_HOME%\incl\esql-etarget-subtype-libtlog-libtlg
-c -Tpd -M
-DEF:deffile-subsystem
%ONEDB_HOME%\lib\igl4b303.lib
%ONEDB_HOME%\lib\iglxb303.lib
%ONEDB_HOME%\lib\igo4b303.lib
c0d32.obj
libset
The italicized terms in the compiler and linker options represent the following definitions.
deffile
Name of a .def file (The -DEF option executes only if you specify a .def file on the command line.)
libset
Library set (depends on whether the application is WINDOWS or CONSOLE).
libtlg
-D_RTLDLL for a dynamic library or " " for a shared library
libtlog
-WM for a multithread library or " " for a single-thread library
proctype
Type of processor (X86)
subsystem
ap for a console subsystem or aa for a Windows™ subsystem
subtype
WC for an executable console, W for a Windows executable file, WCD for a console DLL, or WD for a Windows DLL
systype
Type of subsystem (WINDOWS or CONSOLE)
t
X for a console subsystem and W for a Windows subsystem
target
Name of the executable file (name of first .ec file or the name specified by the -o command-line option)
threadtype
Type of thread option (ML, MT, MD, depending on the value of the -runtime command-line option)

For more information about the -target, -wd, and -we command-line options, see Syntax of the esql command

The library set that the linker uses depends on whether you are creating a Windows or console application. The following table lists the library sets that the indicated esql options use.
Table 2. Library sets that the linker uses

The first column shows the compiler that applies to the columns to the right. The compilers are Microsoft Visual C++, Version 2.x or later and Borland C++, Version 5. The next two columns show the Options for esql and Library sets that the linker uses.

Compiler Options for esql Library sets that the linker uses
Microsoft Visual C++, Version 2.x or later
  • -subsystem:windows
  • -Sw
  • -ss:w
  • advapi32.lib
  • wsock32.lib
  • user32.lib
  • winmm.lib
  • gdi32.lib
  • comdlg32.lib
  • winspool.lib
  • -subsystem:console
  • -Sc
  • -ss:c
  • netapi32.lib
  • wsock32.lib
  • user32.lib
  • winmm.lib
Borland C++, Version 5
  • -subsystem:windows
  • -Sw
  • -ss:w
  • cw32mti.lib
  • import32.lib
  • -subsystem:console
  • -Sc
  • -ss:c
  • cw32mti.lib
  • import32.lib