home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK10 / MFC / SRC / README.TX$ / readme
Encoding:
Text File  |  1992-03-17  |  5.8 KB  |  146 lines

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