When you run the Microsoft Visual C++ 2008 compiler to compile files or to build a project, you receive the following error message:
fatal error C1859: header file name unexpected precompiled header, simply rerunning the compiler might fix this problem.
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.
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.
A 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:
Note 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.
You must have Microsoft Visual Studio 2008 Service Pack 1 installed to apply this hotfix.
You do not have to restart the computer after you apply the hotfix if no instance of Visual Studio is being used.
Hotfix replacement information
This hotfix does not replace any other hotfixes.
The 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.
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:
Microsoft Visual C++ 2008 Express Edition, Microsoft Visual Studio 2008 Academic Edition, Microsoft Visual Studio 2008 Professional Edition, Microsoft Visual Studio 2008 Standard Edition, Microsoft Visual Studio Team System 2008 Database Edition, Microsoft Visual Studio Team System 2008 Architecture Edition, Microsoft Visual Studio Team System 2008 Development Edition, Microsoft Visual Studio Team System 2008 Test Edition, Microsoft Visual Studio Team System 2008 Team Suite