I have found a good article in MSDN:
Setting Up the nsqlprep Precompiler
Before you run the nsqlprep precompiler, do the following:
The nsqlprep precompiler uses your compiler to process header files
Set the INCLUDE environment variable to include the full path where the Sqlca.h and Sqlda.h ESQL/C header files are located and set the LIB environment variable to include the full path where the library files are located. There are several ways to accomplish this, including either:
Issuing a SET statement at the command prompt, such as
SET INCLUDE = C\Mssql17\DevTools\INCLUSE; %include%
SET LIB = C\Mssql17\DevTools\LIB; %LIB%
At the command prompt, first running Vcvar32.bat (in the \Program Files\Microsoft Visual Studio\VC98\Bin directory) and then running setenv.bat (in \Mssql17\DevTools\Samples\Esqlc directory).
The nsqlprep precompiler automatically includes these header files in the C programs it creates. Do not explicitly include them (by using #include) in an Embedded SQL program.
To enable communication with Microsoft® SQL Server™ 2000, ensure that an appropriate Net-Library is loaded or available on the path when precompiling with the /DB and /PASS options. For example, the Named Pipes Net-Library for the Microsoft Windows NT® operating system (Intel® platform) is Dbnmpntw.dll, and the Named Pipes Net-Library for the Microsoft MS-DOS® operating system is the Dbnmpipe.exe TSR.
MS-DOS
The 16-bit ESQL/C compiler and libraries are available for use with SQL Server 7.0 but are not supported. The compiler and libraries can be copied from the SQL Server compact disc. The system requirements for running ESQL/C under 16-bit Microsoft MS-DOS® are:
Microsoft MS-DOS version 6.22 or later
Microsoft Visual C++ development system (16-bit), version 1.52 or later