Annotation of mstools/mfc/src/readme.txt, revision 1.1.1.2

1.1       root        1: =======================================================================
                      2:                        MICROSOFT FOUNDATION CLASSES - SOURCE CODE
                      3: =======================================================================
                      4: 
                      5: This directory contains the source code to the MFC library.
                      6: 
                      7: These files have been included for reference purposes, in
                      8: conjunction with the Class Library reference manual and tutorial.
                      9: 
                     10: These files are compiled to form the Microsoft Foundation Class library.
                     11: The library may be built in a number of configurations, depending upon
                     12: operating system, memory usage or model, and whether or not debugging
                     13: and diagnostic aids are to be included in applications which link with
                     14: the library.
                     15: 
                     16: ================================
                     17:  1.  WINDOWS/NT BUILD NOTES
                     18: ================================
                     19: Please read this section carefully before reading the rest of this
                     20: file.  This section describes important differences between the
                     21: Microsoft C/C++ 7.0 MFC 1.0 release and the Windows/NT BETA release.
                     22: 
                     23: There are four MFC library variants under Windows/NT; these variants
                     24: are built using one of the following nmake invocations:
                     25: 
                     26: nmake MODEL=N TARGET=W DEBUG=1     -- debug, GUI subsystem
                     27: nmake MODEL=N TARGET=R DEBUG=1     -- debug, console subsystem
                     28: nmake MODEL=N TARGET=W DEBUG=0     -- retail, GUI subsystem
                     29: nmake MODEL=N TARGET=R DEBUG=0     -- retail, console subsystem
                     30: 
                     31: 
                     32: Model should always be set to N for NT versions of MFC.
                     33: 
                     34: DLLs are not supported in this release; ignore the DLL argument.
                     35: 
                     36: ================================
                     37:  2.  BUILDING A LIBRARY VARIANT
                     38: ================================
                     39: 
                     40: To build a library in a particular configuration, use the NMAKE tool
                     41: and the Makefile which is in this directory.  The following arguments
                     42: can be given to NMAKE to successfully build a specific library variant.
                     43: 
                     44:   NMAKE {MODEL=[S|M|C|L|N]} {TARGET=[W|R]} {DEBUG=[0|1]} {DLL=[0|1]} \
                     45:                {CODEVIEW=[0|1|2]} {OBJ=path} {OPT=<CL command line switches>}
                     46: 
                     47: MODEL=[S|M|C|L|N]
                     48:   The "MODEL" argument specifies the ambient memory model, which can be
                     49:   one of S, M, C, or L (for Small, Medium, Compact or Large, NT
                     50:   respectively).  NT is for 32 bit Windows NT hosting and targeting.
                     51: 
                     52: TARGET=[W|R]
                     53:   The "TARGET" argument specifies the operating-system on which your
                     54:   compiled programs will run.  This may be one of W or R (for
                     55:   Windows or Real-mode DOS, respectively).  R may be used with TARGET=N
                     56:   for character mode applications on Windows NT.
                     57: 
                     58: DLL=[0|1]
                     59:   The "DLL" argument specifies whether or not to compile the library
                     60:   so that it may subsequently be used for developing a dynamic link
                     61:   library (DLL).  The default is DLL=0 (do not include DLL support).
                     62:   If DLL=1, MODEL must be L (large).
                     63: 
                     64:   NOTE: The MFC library is not itself a DLL; it is always a statically
                     65:   linked library.  This option does not build MFC into a DLL; it builds
                     66:   a static library that can be used to build your DLLs; it is similar
                     67:   in spirit to the C runtime LDLLCEW.LIB library.
                     68: 
                     69: 
                     70: DEBUG=[0|1]
                     71:   The "DEBUG" argument specifies whether or not to include diagnostic
                     72:   support code for the library.  This may be 0 (for no diagnostics) 
                     73:   or 1 (for full diagnostics).
                     74: 
                     75: CODEVIEW=[0|1|2]
                     76:   The "CODEVIEW" argument specifies whether to compile the library with
                     77:   CodeView information or not.  You need to compile the library with
                     78:   CodeView information if you want to trace into MFC code using CodeView.
                     79:   You should also compile your application files with the /Zi option,
                     80:   and link your executable with the /CODEVIEW option.
                     81: 
                     82:   Setting CODEVIEW does not affect the DEBUG argument, although the
                     83:   value of the DEBUG argument does affect the default value of CODEVIEW
                     84:   (discussed below).  A value of 0 indicates that no CodeView
                     85:   information is to be compiled into the library.  A value of 1 says
                     86:   to compile in full CodeView information for all modules of the library.
                     87:   A value of 2 compiles CodeView information only into a select set of
                     88:   the most commonly referenced modules (WinMain, diagnostic memory
                     89:   allocator, message map, main message loop, and the application class.)
                     90: 
                     91:   The default value depends on the setting of the DEBUG argument.
                     92:   If DEBUG=1, CODEVIEW defaults to 2.  If DEBUG=0, CODEVIEW also defaults
                     93:   to 0.
                     94: 
                     95: OBJ=[path]
                     96:   We recommend storing .OBJ files in a separate directory so that you
                     97:   may compile different versions of the MFC library concurrently.
                     98:   The "OBJ" argument allows you to specify where these files are stored
                     99:   during the build process.  The directory specified is created and
                    100:   removed automatically as required.  This defaults to a combination
                    101:   of the target, model, and debug status, preceded by a '$' (i.e. $MWD).
                    102: 
                    103: OPT=[switches]
                    104:   If your library needs to be built with custom compiler switches, then
                    105:   these may be included in the "OPT" argument.  Note that switches need
                    106:   to be separated by spaces, so when including more than one extra
                    107:   compiler switch, enclose the whole OPT= argument in double-quotes.
                    108:   This is an advanced feature; read the Makefile and the details on each
                    109:   of the switches concerned in the Microsoft C/C++ 7.0 Compiler User Manual
                    110:   before using this option.
                    111: 
                    112: Defaults
                    113:   The default is:
                    114:          nmake MODEL=M TARGET=W DEBUG=1 CODEVIEW=2 OBJ=$MWD
                    115: 
                    116: Note.  If you wish to use only the non-Windows classes then build
                    117: an 'R' (real-mode) library variant. There are three MFC sample applications
                    118: that do not require Microsoft Windows, and use the real-mode libraries.
                    119: See the file MFC\SAMPLES\README.TXT for details about each sample and
                    120: which variant of the library each requires.
                    121: 
                    122: 
                    123: ===============================
                    124:  3. AFTER BUILDING THE LIBRARY
                    125: ===============================
                    126: 
                    127: Once the library has been built successfully, you may want to delete
                    128: object files with:
                    129: 
                    130:   NMAKE CLEAN OBJ=[path]
                    131: 
                    132: Note that if you used the "OBJ" argument while building the library,
                    133: specify the same subdirectory in the cleanup command.
                    134: 
                    135: This will remove all of the temporary .OBJ files created by building the
                    136: library, and remove the directory where they were stored.
                    137: 
                    138: Always perform a cleanup before building a new variant of the library,
                    139: or use different object paths for each variant.  Note that the OBJ files
                    140: are only necessary during the building process.
                    141: 
                    142: 
                    143: ======================================
                    144:  4. SOURCE CODE FORMATTING CONVENTION
                    145: ======================================
                    146: 
                    147: All MFC source code has been formatted such that leading whitespace
                    148: on a line is made up of physical tabs, while embedded whitespace is
                    149: physical spaces.  MFC source code assumes that your editor is set to
                    150: display a physical tab as four blanks.
                    151: 
                    152: For example:
                    153: 
                    154: int FormatExample()
                    155: {
                    156: /*
                    157: Statements below should start in column 5 if tabs are set correctly
                    158: Comment should start in column 20
                    159: 12345678901234567890
                    160: */
                    161:        int i;
                    162:        i = 5;         // whitespace between statement and comment is spaces
                    163: 
                    164:        return i;
                    165: 
                    166: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.