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

ID: Q104675

The information in this article applies to:

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          : kberrmsg kb16bitonly kbnokeyword kbMFC kbVC 
Version           : 1.0 1.5
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbfix

Last Reviewed: September 18, 1997