FIX: TEMPLDEF Fails to Add #endif to NEWCOLL.H and NEWCOLL.INL

Last reviewed: September 16, 1997
Article ID: Q104675

The information in this article applies to:
  • The Microsoft Foundation Classes (MFC) included with:

        - Microsoft Visual C++ for Windows, versions 1.0, 1.5
    

SYMPTOMS

The MKCOLL.BAT batch file included with the TEMPLDEF sample creates two files, NEWCOLL.H and NEWCOLL.INL. If these files are used to replace AFXCOLL.H and AFXCOLL.INL, the following errors occur when compiling:

   fatal error C1070: mismatched #if/#endif pair in file 'newcoll.h'
   fatal error C1070: mismatched #if/#endif pair in file 'newcoll.inl'

CAUSE

The AFXCOLL2.H file in the \MSVC\MFC\SAMPLES\TEMPLDEF directory is missing the following line at the end of the file:

   #endif //!__AFXCOLL_H__

Also, the AFXCOLL2.INL file in the \MSVC\MFC\SAMPLES\TEMPLDEF directory is missing the the following line at the end of the file:

   #endif //_AFXCOLL_INLINE

RESOLUTION

Add the lines shown above to the related files.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Foundation Classes (MFC) version 2.0 that shipped with Visual C++ for Windows, version 1.0. This problem has been fixed in the MFC version 2.5 that shipped with Visual C++ for Windows, version 1.5.


Additional query words: template TEMPLDEF.EXE
Keywords : kb16bitonly MfcMisc kberrmsg kbfasttip
Technology : kbmfc
Version : 1.0 1.5
Platform : WINDOWS
Issue type : kbbug
Solution Type : kbfix


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: September 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.