Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Drakkcon

WIN32_LEAN_AND_MEAN

This topic is 5243 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Guest Anonymous Poster
Faster Builds and Smaller Header Files
Home | Overviews

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.

Knowledge Base article Q151666 also discusses these preprocessor definitions.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
...unless you want to use one of the things that it removes. ;-)

But the short answer is yes you''re probably OK by using it.

Share this post


Link to post
Share on other sites
These headers won''t be included if it is defined:

#ifndef WIN32_LEAN_AND_MEAN
#include <cderr.h>
#include <dde.h>
#include <ddeml.h>
#include <dlgs.h>
#include <imm.h>
#include <lzexpand.h>
#include <mmsystem.h>
#include <nb30.h>
#include <rpc.h>
#include <shellapi.h>
#include <winperf.h>
#ifndef NOGDI
#include <commdlg.h>
#include <winspool.h>
#endif

Share this post


Link to post
Share on other sites
I always delete it as it always seems to not include something I want! If you have PCH does it really make a diffrence to speed except on first build/change of headers?

Share this post


Link to post
Share on other sites
alright thanks guys. I guess my approach will be RenderTarget''s.
#define WIN32_LEAN_AND_MEAN and then include the source files if they''re not included.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!