Microsoft KB Archive/179270

= FIX: Warnings with RTTI and Automatic Precompiled Headers =

Article ID: 179270

Article Last Modified on 7/31/2003

-

APPLIES TO

 Microsoft Visual C++ 5.0 Enterprise Edition, when used with:  Microsoft Windows 95

 Microsoft Windows NT 4.0  Microsoft Visual C++ 6.0 Enterprise Edition, when used with:  Microsoft Windows 95

 Microsoft Windows NT 4.0</li></ul> </li> Microsoft Windows 2000 Professional Edition</li> Microsoft Windows 2000 Server</li> Microsoft Windows 2000 Advanced Server</li></ul>

-

<div class="notice_section">

This article was previously published under Q179270

<div class="symptoms_section">

SYMPTOMS
If Run-Time Type Information (RTTI) is selected in the C/C++ project settings and if you have selected Automatic use of precompiled headers for all files, including Stdafx.cpp, you may receive several warning messages such as the following example:

BSCMAKE: warning BK4503 : minor error in .SBR file '.\Debug\MainFrm.sbr' ignored

<div class="resolution_section">

RESOLUTION
You can use one of the following two methods:  Method 1 <ol> On the Project menu, click Settings.</li> In the Project Settings dialog box, click the C/C++ tab.</li> Click to select C++ Language from the Category list.</li> Click to clear Enable Run-Time Type Information (RTTI), and then click to select Rebuild All from the Build menu.</li></ol> </li> Method 2 <ol> From the left side of the Project Settings dialog box, expand the project tree, and then select the Stdafx.cpp file.</li> On the C/C++ tab, select Precompiled Headers from the Category list box.</li> Click to select Create precompiled header file(.pch) for the Stdafx.cpp file, and then type stdafx.h in the Through header box.</li> From the left side of the Project Settings dialog box, select the project.</li> <li>On the C/C++ tab, click to select Precompiled Headers from the Category list.</li> <li>Click to select Use precompiled header file(.pch) for the Stdafx.cpp file, type stdafx.h in the Through header box, and then click to select Rebuild All from the Build menu.</li></ol>

</li></ul>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

<div class="moreinformation_section">

Steps to Reproduce the Behavior

 * 1) Create a default Custom AppWizard .exe project.
 * 2) Select your project in the ClassView window, and then on the Project menu, click Settings.
 * 3) On the C/C++ tab of the Project Settings dialog box, click C++ Language from the Category list, and then click to select Enable Run-Time Type Information (RTTI).
 * 4) From the Category list, click Precompiled Headers, and then click to select Automatic use of precompiled headers for all the .cpp files in the project, including the Stdafx.cpp file.
 * 5) Under General, click to select Generate browse info.
 * 6) Click the Browse Info tab, and then click to select Build browse info file.
 * 7) Rebuild the project to see the warning messages that are described earlier in this article.

You may receive the warning messages when you perform a Build if the precompiled header was previously created without browse information. You can resolve this when you perform a Rebuild All of the project; otherwise, follow the resolution that is provided in this article.

Keywords: kbbug kbfix kbnoupdate kbcompiler kbprod2web KB179270

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.