TARGETTYPE
Use the TARGETTYPE macro to specify the type of product being built. TARGETTYPE gives the Build utility clues about some of the input files that it should expect. You must include this macro in your Sources file.
When you build a DLL, TARGETTYPE is typically LIBRARY or DYNLINK.
The full list of possible values is as follows.
Value | Definition | ProductExtension |
---|---|---|
PROGRAM |
A user-mode program that does not export anything. |
.exe |
PROGLIB |
An executable program that also exports functions for other programs. |
.exe |
DYNLINK |
A dynamic-link library (DLL). This could be a control panel program or any other program that can be dynamically loaded. A dynamic-link library exports functions that other binaries can link to. The DLL switch is passed to the linker to indicate that the build product isnot a stand-alone .exe. When you build a dynamic-link library, you might also need to set the TARGETEXT macro. |
.dll |
LIBRARY |
A user-mode import library that contains code that will be linked with other code. This is a library of objects, not an import library. It contains routines to which other components can link statically. (An import library is built as a side effect of building a dynamic-link library. Whenever you build a DLL, you get a .lib file and a .dll file. When you build a library, you just get a .lib file.) |
.lib |
DRIVER_LIBRARY |
A kernel-mode import library. This is the kernel-mode equivalent of LIBRARY. It contains routines to which other kernel-mode components can link statically. |
.lib |
DRIVER |
A kernel-mode driver. |
.sys |
EXPORT_DRIVER |
A kernel-mode driver that also exports functions for other drivers. |
.sys |
MINIPORT |
A kernel-mode driver that does not link with ntoskrnl.lib or hal.lib. |
.sys |
GDI_DRIVER |
A kernel-mode graphics driver that links with win32k.sys. |
.dll |
BOOTPGM |
A kernel-mode driver. |
.exe |
HAL |
The hardware abstraction layer. |
.dll |
NOTARGET |
Specifies that no target should actually be created. Use this if you have a directory that needs some processing, but you do not want a binary to be generated. |
Send comments about this topic to Microsoft
Build date: 5/3/2011