You can compile and link precompiled ESQL/C programs for Microsoft® Windows NT® and Microsoft Windows® 95 or Microsoft Windows 98 on a computer running the Windows NT 4.0, Windows 95, or Windows 98 operating system by using Microsoft Visual C++® version 4.5 or later.
You can set the LIB environment variable to avoid specifying library paths for the Embedded SQL libraries, for example:
SET LIB= C:\Program Files\Microsoft SQL Server\80\Tools\DevTools\Lib;C:\MSDEV\LIB
The following libraries are supplied and used by ESQL/C programs when built for Windows NT 4.0 and Windows 95 or Windows 98:
To compile and link a program for Windows NT 4.0, Windows 95 or Windows 98
- Run the compiler Cl.exe as you would for Windows NT 4.0 or Windows 95 or Windows 98 to create an object file, for example:
CL /c /W3 /D"_X86_" MYPROGRM.C
In this example, the compiler creates the object file Myprogrm.obj. The /D"_X86_" compiler option defines the symbol necessary for Windows NT 4.0, Windows 95, or Windows 98 operating systems that run on Intel®-based computers.
You can use any additional compiler options allowed by the compiler.
- Run the linker (Link.exe) as you would for Windows NT 4.0, Windows 95 or Windows 98 to link the compiled ESQL/C object file and system libraries, which creates an executable file for Windows NT 4.0, Windows 95, or Windows 98. When linking files for Windows NT 4.0, Windows 95, or Windows 98 programs, you must explicitly link with the Sqlakw32.lib and Caw32.lib libraries; for example:
LINK /NOD /subsystem:windows MYPROGRM.OBJ MYPROGRM.RES KERNEL32.LIB GDI32.LIB USER32.LIB LIBCMT.LIB SQLAKW32.LIB CAW32.LIB
In the example, the compiled object file Myprogrm.obj, system libraries, and the ESQL/C libraries Sqlakw32.lib and Caw32.lib are linked together to create the executable file Myprogrm.exe for Windows NT 4.0, Windows 95, or Windows 98.
To run a Windows NT 4.0, Windows 95, or Windows 98 ESQL/C application, the dynamic-link libraries Sqlakw32.dll, Ntwdblib.dll, and Dbnmpntw.dll (or other appropriate Net-Library) must be available in the path.