comments about #define WIN32_LEAN_AND_MEAN
MSDN:
---------------------------------
To speed the build process, Visual C++ provides the following defines that reduce the size of the Win32 header files.
VC_EXTRALEAN
WIN32_LEAN_AND_MEAN
Newly generated Visual C++ AppWizard applications automatically benefit from VC_EXTRALEAN. You can also manually define VC_EXTRALEAN to speed the build process of many legacy MFC applications.
Non-MFC C++ and C applications can define WIN32_LEAN_AND_MEAN and any applicable NOservice defines, such as NOSOUND (see ProgramFiles\Microsoft Visual Studio\VC98\include\Windows.h and ProgramFiles\Microsoft Visual Studio\VC98\MFC\Include\afxv_w32.h), to reduce their build times.
To add these defines, from the Project menu, choose Settings. The Projects settings dialog box appears. Click the C/C++ tab. In the Category list, select Preprocessor. Add the desired definitions to the Preprocessor Definitions box.
MSDN的资料:
---------------------------------
为加速生成过程,Visual C++ 提供了如下定义(这些定义通过排除一些不太常用的 API,减小了 Win32 头文件的大小):
VC_EXTRALEAN
WIN32_LEAN_AND_MEAN
VC_EXTRALEAN 定义 WIN32_LEAN_AND_MEAN 和若干 NOservice 定义,如 NOCOMM 和 NOSOUND。(有关 NOservice 定义列表,请参见头文件 Windows.h 和 MFC 头文件 afxv_w32.h。)
用 Visual C++ 应用程序向导创建的应用程序自动使用 VC_EXTRALEAN。可以在旧式 MFC 应用程序中手动定义 VC_EXTRALEAN 以加速生成过程。
非 MFC 应用程序可以定义 WIN32_LEAN_AND_MEAN 和适用的 NOservice 定义以减少生成时间
Note:use
#define WIN32_LEAN_AND_MEAN
before
#include
when you use some header file like [ DDK ]
can avoid many redefinition error.
在所有的#include 前使用#define WIN32_LEAN_AND_MEAN,如:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
|
阅读(1143) | 评论(0) | 转发(0) |