Thread: MEAN or just LEAN?

  1. #1
    Registered User -leech-'s Avatar
    Join Date
    Nov 2001
    Posts
    54

    MEAN or just LEAN?

    I just noticed that there are some predefined Windows #define's name WIN32_LEAN_AND_MEAN and WIN32_EXTRA_LEAN. What exactly do these do? Would it be wise to use them? Which one is LEANer?

    Thanks.
    Not yet, have to think of one...

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    They just exclude some headers from your build. They arguably shorten compile time because all this superfluous stuff isn't dragged in, but i've only ever seen a size reduction in final exe when compiling with an old Borland Builder using these macros.

    There's also VC_EXTRALEAN...

    The downside of using these things is that if your program uses any fns etc declared in these missing headers then you would either have to remove the macro or manually include the required headers.

    So when in doubt...leave them out.

    But to check out exactly what is excluded, when, where and how then check out:

    WIN32_LEAN_AND_MEAN header: windows.h
    WIN32_EXTRA_LEAN,VC_EXTRALEAN header: afxv_w32.h (ie mfc)

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    223

    MEAN and LEAN

    OK according Peter Walsh int the book The Zen of Direct3D Game Programming... the coming of MFC(microsoft foundation classes) required that the windows.h files be updated with a gazillion (a significant amount) lines of code to provide seamles object oriented interface.
    If you are not using MFC include MEAN_AND_LEAN... as for the EXTRA_LEAN ... hmm????
    zMan

Popular pages Recent additions subscribe to a feed