You can compile and link precompiled ESQL/C programs for Microsoft® Windows NT® and Microsoft Windows® 95/98 on a computer running the Windows NT or Windows 95/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:\MSSQL7\DevTools\LIB;C:\MSDEV\LIB
The following libraries are supplied and used by ESQL/C programs when built for Windows NT and Windows 95/98:
To compile and link a program for Windows NT and Windows 95/98
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 and Windows 95/98 operating systems that run on Intel®-based computers. To create an object file for a Windows NT client on the Alpha platform, /D”__D_ALPHA__” compiler option is necessary, and the code would appear as follows:
CL /c /W3 /D"_D_ALPHA_" MYPROGRM.C
You can use any additional compiler options allowed by the compiler.
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 or Windows 95/98.
To run a Windows NT or Windows 95/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.