Microsoft KB Archive/107868

{|
 * width="100%"|

FIX: Foundation Class Library Makefile Builds Wrong Library

 * }

Q107868

7.00 | 1.00 MS-DOS | WINDOWS kbprg kbfixlist kbbuglist -- 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, version 1.0 -- SYMPTOMS ======== Specifying DLL=0 when building the Microsoft Foundation Class (MFC) Library versions 1.0 and 2.0 variants causes the large-model version of the requested library to be built even when a different memory model is requested. CAUSE ===== The only memory model possible when building a dynamic-link library (DLL) version of an MFC Library is large. The makefile provided to build the MFC Library variants sets the memory model to large whenever the DLL option is specified. This happens even when the value of the DLL option is set to 0 (zero) to indicate that a DLL is not being built. RESOLUTION ========== Do not specify the DLL option when building a non-DLL version of an MFC Library. STATUS ====== Microsoft has confirmed this to be a problem in the Microsoft Foundation Classes versions 1.0 and 2.0, for MS-DOS and Windows, which come with Microsoft C/C++ 7.0 and Visual C++ 1.0. This has been fixed in the Microsoft Foundation Classes version 2.5 for MS-DOS and Windows, which comes with Microsoft Visual C++ version 1.5. MORE INFORMATION ================ A makefile, filename MAKEFILE, is provided in the MFC\SRC directory for the purpose of building various versions of the MFC Library. A README.TXT file in the MFC\SRC directory describes the syntax needed to build the different library types. Note that the parameters passed to this makefile are case-sensitive; they MUST be in uppercase letters for the makefile to recognize them. The following command entered in the MFC\SRC directory will build the large- model, Windows-targeted, version of the Microsoft Foundation Class library (lafxcwd) rather than the expected medium-model version (mafxcwd): NMAKE MODEL=M TARGET=W DLL=0 The correct library can be obtained by not specifying the DLL option as shown below: NMAKE MODEL=M TARGET=W Additional reference words: 7.00 1.00 2.00 KBCategory: kbprg kbfixlist kbbuglist KBSubcategory: MfcMisc

Keywords : kb16bitonly kbnokeyword kbMFC kbVC

Issue type :

Technology : kbAudDeveloper kbMFC