Previous Next

Building a Sample Driver

Although the Build utility has a great number of features — and some of them are rather obscure — it is very easy to begin using this utility to build useful binaries.

To build a single DDK sample driver

  1. Open a build environment window. The command prompt appears with the DDK installation directory as its current directory.
  2. Change to the src subdirectory of the DDK directory. Within this directory are all the samples. Navigate to the subdirectory containing the sample you want to build.
  3. Invoke the Build utility with the -cZ options, as in the following example:
    E:\DDK> cd src
    E:\DDK\src> cd wdm\AVStream\avssamp
    E:\DDK\src\wdm\AVStream\avssamp> build -cZ
    

The -cZ option creates a clean build of the samples (by deleting all preexisting .obj files). It also inhibits the dependency checking of source and header files. For other available options, see Build Utility Command-Line Options and Using Macros and Environment Variables. The sources file lets the Build utility know what to build.

To build all samples at once

  1. Open a build environment window. The command prompt appears with the DDK installation directory as its current directory.
  2. Change to the src subdirectory of the DDK directory.
  3. Invoke the Build utility with the -cZ options, as in the following example:
    E:\DDK> cd src
    E:\DDK\src> build -cZ
    

The dirs files in the sample tree instruct the Build utility on how to recurse through the entire tree.