Release MFC Libraries for MS-DOS Limited to 286 and Up

Last reviewed: July 22, 1997
Article ID: Q118614
7.00 | 1.00 1.50 MS-DOS | WINDOWS kbprg

The information in this article applies to:

  • The Microsoft Foundation Classes (MFC) included with:

        - Microsoft C/C++ version 7.0
        - Microsoft Visual C++ for Windows, versions 1.0 and 1.5
    

SUMMARY

The release version of the MFC libraries for MS-DOS are built with the /O1 option, which also implies the /G2 option. Because the /G2 option places 80286-processor-specific code in the library that is being built, programs built with this library are incompatible with 8086(8088) and 80186(80188) processors. One symptom of this incompatibility is that the MS-DOS program may crash when run on either an 8086(8088) or an 80186(80188) machine.

The debug version of the MFC libraries for MS-DOS are built using the /Od option, so 80286-specific code is not generated for the debug libraries.

MORE INFORMATION

To change this behavior, edit the makefile that is provided in the \MSVC\MFC\SRC directory and rebuild the library. Use the steps below to edit the makefile so that the /O1 option is not used for release builds of the MFC libraries for MS-DOS:

  1. Go to the NON-DEBUG OPTIONS section of the makefile.

  2. Find the DEBOPTS= line.

  3. Change "/O1" to "/f- /Oe /Os /Ob1 /OV4 /Gs /Gf /Gy" (without the quotes).

  4. Save the file.

To rebuild the library, follow the instructions in the README.TXT file, which is located in the \MSVC\MFC\SRC directory.


Additional reference words: kbinf 7.00 1.00 1.50 2.00 2.50
KBCategory: kbprg
KBSubcategory: MfcMisc
Keywords : kb16bitonly
Technology : kbMfc


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.