Article ID: 976656 - View products that this article applies to.
When you run the Microsoft Visual C++ 2008 compiler to compile files or to build a project, you receive the following error message:
Additionally, this issue still occurs even when you run the compiler again. This issue occurs when you enable the Create/Use Precompiled Header compiler option on a computer that is running Windows 7 or Windows Server 2008.
fatal error C1859: header file name unexpected precompiled header, simply rerunning the compiler might fix this problem.
Note You may encounter this issue more frequently if you enable the /analyze compiler option.
When you enable the Create/Use Precompiled Header compiler option, the compiler requires that the precompiled header files and the relative modules do not move between compilations. However, the Address Space Layout Randomization (also known as ASLR) feature randomly relocates modules in a process. Therefore, the error occurs when modules move between compilations.
Hotfix informationA supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
To download this hotfix from the Microsoft Developer Network (MSDN) Code Gallery, visit the following Microsoft Web site:
Note The MSDN Code Gallery displays the languages for which the hotfix is available. If you do not see your language listed, it is because the Code Gallery resource page is not available for that language.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=supportNote You can also download this hotfix from the following Microsoft Web site:
https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=25785Note This hotfix package also contains a fix for "C1001: An internal error has occurred in the compiler (compiler file f:\dd\vctools\compiler\utc\src\p2\main.c, line 182) when you are using .NET framework 3.5.
PrerequisitesYou must have Microsoft Visual Studio 2008 Service Pack 1 installed to apply this hotfix.
Restart requirementYou do not have to restart the computer after you apply the hotfix if no instance of Visual Studio is being used.
Hotfix replacement informationThis hotfix does not replace any other hotfixes.
File informationThe English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Collapse this tableExpand this table
To work around this problem, use one of the following methods.
Disable the /analyze compiler option if it is enabled.
Start a clean build.
Restart the computer.
Disable the Create/Use Precompiled Header compiler option.
Note These methods are not guaranteed to work. Even if you use one of these methods, you may still encounter this issue.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
For more information about Address Space Layout Randomization, visit the following Microsoft blog post:
Address Space Layout Randomization in Windows VistaFor more information about Precompiled Header errors, visit the following Microsoft blog post:
Precompiled Header errors in Windows 7
Article ID: 976656 - Last Review: January 20, 2012 - Revision: 3.0