FIX: Warnings with RTTI and Automatic Precompiled Headers (179270)



The information in this article applies to:

  • Microsoft Visual C++, 32-bit Enterprise Edition 5.0, when used with:
    • the operating system: Microsoft Windows 95
    • the operating system: Microsoft Windows NT
  • Microsoft Visual C++, 32-bit Enterprise Edition 6.0, when used with:
    • the operating system: Microsoft Windows 95
    • the operating system: Microsoft Windows NT
  • Microsoft Windows 2000 Professional
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server

This article was previously published under Q179270

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

RESOLUTION

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

STATUS

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

MORE INFORMATION

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.

Modification Type:MajorLast Reviewed:7/31/2003
Keywords:kbCompiler kbProd2Web kbBug kbfix kbNoUpdate KB179270 kbAudDeveloper