2009年9月20日 星期日

compile windows project

1. open a build environment window
start -> all programs -> windows driver kits -> wdk 7600.16385.0 -> build environments -> windows 7 -> x64 free build environment

2. In the project directory, two supporting files are needed
1. Makefile
2. sources
This file contains project-specific information that is used to build the driver, such as the list of source files.

options files:
Makefile.inc:
the directives for building the custom targets are placed in Makefile.inc. Makefile itself should never be modified.

.inx file:
An INX file is an architecture-independent INF file. When the appropriate instructions are specified, the Build utility uses the data in an INX file to produce an appropriate INF file for the project.

3. compile driver
in the project directory, type "build -g"
-g:Uses colored text to display warnings, errors, and summaries.
usually use "build -ceZ"
4. the file created from building
a output directory :
ex: objfre_wxp_x86\i386 for windows xp
objfre_wnet_x86\i386 for windows 2003
files in the directory:
(1) driver binary:
for KMDF, it is .sys file
for UMDF, it is .dll file
(2) object files for source file
(3)symbol file
.pdf file, for debugging

沒有留言:

張貼留言