PRB: LIBRARY Target Type Does Not Include Driver Headers (320067)
The information in this article applies to:
- Microsoft Windows XP Driver Development Kit (DDK)
- Microsoft Windows .NET Driver Development Kit (DDK) BETA
This article was previously published under Q320067 SYMPTOMS
If you use the Windows XP or Windows .NET DDK to compile kernel-mode libraries by specifying the following in your SOURCES file
this may generate errors because of missing headers. This behavior is more evident when you compile sample libraries from the Microsoft Windows 2000 DDK, because samples in that particular DDK use the 'LIBRARY' TARGETTYPE directive and include kernel-mode-only headers.
CAUSE
This behavior occurs because the Windows XP and Windows .NET DDKs automatically set default include paths, which depend on the type of executable being built (such as EXE and DRIVER). However, when TARGETTYPE=LIBRARY is specified, the Windows XP and Windows .NET DDKs default to the inclusion of the %SDK_INC_PATH% only, and do not automatically include the %DDK_INC_PATH% or %WDM_INC_PATH%. This is because the library is assumed to be a user-mode library.
RESOLUTION
If the current TARGETTYPE is LIBRARY, and kernel includes are needed, use one of the following methods, as appropriate to your situation:
- If your code is user-mode-oriented, update the INCLUDES.
-or- - If your code is kernel-mode-oriented, revise the TARGETTYPE value to DRIVER_LIBRARY.
STATUSThis behavior is by design.REFERENCES
See the relevant DDK for more information about the build environment and the aforementioned environment variables.
Modification Type: | Minor | Last Reviewed: | 7/22/2004 |
---|
Keywords: | kbKMode kbprb KB320067 |
---|
|