How to Build Cursor Demo

The file \Samples\Odbc\Cursor\Crsrdemo.mak is set up for compilation in 32-bit environments using a Microsoft or Microsoft-compatible C compiler. Use the \Samples\Odbc\Cursor\Crsrdemo.bat file to set up the appropriate environment and invoke the appropriate compiler and linker.

Note   The CRSRDEMO.MAK file assumes that you have installed the Win32 SDK. If you are using Visual C++ 1.0 or later on Windows NT, Cursor Demo will not compile with the provided CRSRDEMO.MAK. Instead, you must use the makefile generated by Visual C++.

To build the sample, change to the \Samples\Odbc\Cursor directory, then:




Unrecognized arguments to CRSRDEMO.BAT will halt compilation with a warning.

CRSRDEMO.BAT calls NMAKE, the Microsoft Program Maintenance Utility provided with Microsoft C version 7.0 or later, on the file CRSRDEMO.MAK to rebuild the CRSRDEMO.EXE file. If CRSRDEMO.MAK is unmodified, CRSRDEMO.BAT will rebuild the original CRSRDEMO.EXE sample.

For information about using NMAKE, see your C compiler tools documentation.

Compiling A Multithreaded Cursor Demo

An optional build switch, "thread", compiles a version of Cursor Demo that is multithreaded under Windows NT. For example, to compile a 32-bit debug version in the \Samples\Odbc\Cursor\Debug32 directory, type:

CRSRDEMO DEBUG32 THREAD

Only 32-bit builds (debug32 or ndebug32) can specify the "thread" switch. The default is the "nothread" option.

Note   Perform a clean build before switching from a "thread" to a "nothread" build (or vice versa) in the same directory (DEBUG32 or NDEBUG32); that is, delete all .OBJ files before beginning the next build.