Building an Auto Test

To build an auto-test DLL from code you have written, change your directory to \Samples\Odbc\Quiktest. You can use the \Samples\Odbc\Quiktest\Qtbuild.bat file to set the proper environment and invoke the appropriate compiler and linker.

QTBUILD tstname [options]

where tstname is the base name of your .C file and options are one or more of the following:

Option Meaning
-CLEAN Build all targets, even if the targets are not out of date with respect to their dependencies.
-DEBUG32 Build the 32-bit debug version in the \Samples\Odbc\Quiktest\Debug32 directory.
-NDEBUG32 Build the 32-bit non-debug version in the \Samples\Odbc\Quiktest\Ndebug32 directory.
-? Display usage information.

QTBUILD.BAT calls NMAKE, the Microsoft Program Maintenance Utility provided with Microsoft C, version 7.0 or later, to process MAKEFILE to build the auto test DLL. If MAKEFILE is not modified, QTBUILD.BAT rebuilds the original QUIKTEST.DLL.

Required Files

To build an auto test, QTbuild.exe needs the following files:

File Name Description
autotest.h Include file containing the constants and prototypes required to build an auto-test DLL. All auto tests must include this file.
dllstub.c Source file containing the library entry points for 16- and 32-bit DLLs.
Makefile Makefile for auto test DLLs.
tstname.c
tstname1.c
tstname2.c
Source files. Only tstname.c is required. However, if your auto test requires additional source files, the Makefile makefile requires that they are named tstname1.c and tstname2.c.
tstname.h Optional include file.
tstname.rc Optional resource file.