Error message when you use the Visual C++ 2008 compiler: "fatal error C1859"


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.


Hotfix information

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 You can also download this hotfix from 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.

Restart requirement

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.

File information

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.
File nameFile versionFile sizeDateTime


To work around this problem, use one of the following methods.

Method 1

Disable the /analyze compiler option if it is enabled.

Method 2

Start a clean build.

Method 3

Restart the computer.

Method 4

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.

More Information

For more information about Address Space Layout Randomization, visit the following Microsoft blog post: For more information about Precompiled Header errors, visit the following Microsoft blog post: