Symptoms
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.
Cause
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.
Resolution
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:
http://code.msdn.microsoft.com/KB976656
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:ddvctoolscompilerutcsrcp2main.c, line 182) when you are using .NET framework 3.5.
Prerequisites
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 name |
File version |
File size |
Date |
Time |
|---|---|---|---|---|
|
C1.dll |
15.0.30729.4455 |
677,184 |
10-Dec-2009 |
02:31 |
|
C1.dll |
15.0.30729.4455 |
828,744 |
10-Dec-2009 |
02:31 |
|
C1xx.dll |
15.0.30729.4455 |
2,202,952 |
10-Dec-2009 |
02:31 |
|
C1xx.dll |
15.0.30729.4455 |
2,213,704 |
10-Dec-2009 |
02:31 |
|
C1xx.dll |
15.0.30729.4455 |
2,348,360 |
10-Dec-2009 |
02:31 |
|
C1xx.dll |
15.0.30729.4455 |
2,504,016 |
10-Dec-2009 |
02:31 |
|
C1xx.dll |
15.0.30729.4455 |
2,890,568 |
10-Dec-2009 |
02:31 |
Workaround
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.
Status
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:
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
Need more help?
Симптомы
При запуске Microsoft Visual C++ 2008 компилятор для компиляции файлов или построения проекта, появляется следующее сообщение об ошибке:
Неустранимая ошибка C1859: имя файла заголовка Непредвиденная предкомпилированного заголовка, просто запустить компилятор может устранить проблему.
Кроме того эта проблема по-прежнему возникает даже при запуске компилятора снова. Эта проблема возникает при включении параметра компилятора Создавать или использовать предварительно скомпилированный заголовочный файл на компьютере под управлением Windows 7 или Windows Server 2008.
Примечание. Могут возникнуть дополнительные проблемы часто при включении параметра компилятора / analyze .
Причина
При включении параметра Создавать или использовать предварительно скомпилированный заголовочный файл компилятора компилятор требует, что относительный модули и файлы предкомпилированных заголовков не перемещения между компиляциями. Тем не менее функция случайный выбор макета адрес пространства (также известный как ASLR) размещает случайным образом модули в процессе. Таким образом эта ошибка возникает при перемещении модулей в промежутке между компиляциями.
Решение
Сведения об исправлении
Существует исправление от корпорации Майкрософт. Однако данное исправление предназначено для устранения только проблемы, описанной в этой статье. Применяйте данное исправление только в тех системах, которые имеют данную проблему. Это исправление может проходить дополнительное тестирование. Таким образом если вы не подвержены серьезно этой проблеме, рекомендуется дождаться следующего пакета обновления, содержащего это исправление.
Чтобы загрузить это исправление из коллекции кода Microsoft Developer Network (MSDN), посетите следующий веб-узел корпорации Майкрософт:
http://code.msdn.microsoft.com/KB976656
Примечание. Коллекции кода MSDN отображаются языки, для которых доступно исправление. Если в списке язык не отображается, это недоступности страница коллекции кода для этого языка.
Примечание. Если наблюдаются другие проблемы или необходимо устранить неполадки, вам может понадобиться создать отдельный запрос на обслуживание. Стандартная оплата за поддержку будет взиматься только за дополнительные вопросы и проблемы, которые не соответствуют требованиям конкретного исправления. Чтобы получить полный список телефонов поддержки и обслуживания клиентов корпорации Майкрософт или создать отдельный запрос на обслуживание, посетите следующий веб-сайт корпорации Майкрософт:
http://support.microsoft.com/contactus/?ws=supportПримечание. Также можно загрузить исправление с веб-узла корпорации Майкрософт:
https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=25785Примечание. Данное исправление также содержит исправления для «C1001: Внутренняя ошибка компилятора (файл компилятора f:ddvctoolscompilerutcsrcp2main.c, строка 182) при использовании .NET framework 3.5.
Предварительные условия
Microsoft Visual Studio 2008 Пакет обновления 1 для установки этого исправления необходимо иметь.
Необходимость перезагрузки
Необходимо перезагрузить компьютер после установки исправления, если используется не экземпляр Visual Studio.
Сведения о замене исправлений
Это исправление не заменяет других исправлений.
Сведения о файлах
Английская версия данного исправления содержит атрибуты файла (или более поздние атрибуты файлов), приведенные в следующей таблице. Дата и время для этих файлов указаны в формате общего скоординированного времени (UTC). При просмотре сведений о файле, он преобразуется в локальное время. Чтобы узнать разницу между временем по Гринвичу и местным временем, следует использовать
Часовой пояс
вкладке
Дата и время
элемент панели управления.
|
Имя файла |
Версия файла |
Размер файла |
Дата |
Время |
|---|---|---|---|---|
|
C1.dll |
15.0.30729.4455 |
677,184 |
10-Dec-2009 |
02:31 |
|
C1.dll |
15.0.30729.4455 |
828,744 |
10-Dec-2009 |
02:31 |
|
C1xx.dll |
15.0.30729.4455 |
2,202,952 |
10-Dec-2009 |
02:31 |
|
C1xx.dll |
15.0.30729.4455 |
2,213,704 |
10-Dec-2009 |
02:31 |
|
C1xx.dll |
15.0.30729.4455 |
2,348,360 |
10-Dec-2009 |
02:31 |
|
C1xx.dll |
15.0.30729.4455 |
2,504,016 |
10-Dec-2009 |
02:31 |
|
C1xx.dll |
15.0.30729.4455 |
2,890,568 |
10-Dec-2009 |
02:31 |
Временное решение
Чтобы обойти эту проблему, воспользуйтесь одним из следующих методов.
Способ 1
Если он включен, отключите параметр компилятора / analyze .
Способ 2
Запустите построение с нуля.
Способ 3
Перезагрузите компьютер.
Способ 4
Отключите параметр компилятора Создавать или использовать предварительно скомпилированный заголовочный файл .
Примечание. Эти методы не являются гарантированно работать. Даже при использовании одного из этих методов по-прежнему могут возникнуть проблемы.
Статус
Корпорация Майкрософт подтверждает, что это проблема продуктов Майкрософт, перечисленных в разделе «Относится к».
Дополнительные сведения
Дополнительные сведения о случайный выбор макета адрес пространства посетите следующий Microsoft блога:
Адрес места случайный выбор макета в Windows VistaДополнительные сведения о предварительно скомпилированный заголовочный файл ошибок посетите следующий Microsoft блога:
Предкомпилированный заголовок ошибки в Windows 7
Нужна дополнительная помощь?
- Remove From My Forums
-
Question
-
-
Edited by
Wednesday, November 25, 2015 9:28 AM
-
Edited by
Answers
-
we are now and then discovering the error message «fatal error C1859: header file name unexpected precompiled header, simply rerunning the compiler might fix this problem.» while using a Visual C++
2008 Compiler on a Win2k8R2 maschine.After some searching, there is a KB released for this particular Errors: KB976656 :https://support.microsoft.com/en-us/kb/976656
So does anyone a current status of this KB or could point me to the right download area to fetch it?
Try here:
http://thehotfixshare.net/board/index.php?showtopic=14050
File Name: VS90SP1-KB976656-x86.exe
File Submitted: 30 Jan 2010
File Category: English Microsoft Visual Studio 2008 Hotfix DownloadsKB976656 — Error message when you use the Visual C++ 2008 compiler: «fatal error C1859»
I have just downloaded it to check the links, and it passes a local virus scan using
ESET and the ESET reputation Live Grid lists the file as «Fine». To be extra sure I
scanned it at VirusTotal and it came up clean with 55 scanners.— Wayne
-
Marked as answer by
DH_AW
Friday, December 4, 2015 8:21 AM
-
Marked as answer by
-
I found this site too, but was a little bit uneasy to download a Microsoft update from another source.
-
Marked as answer by
DH_AW
Friday, December 4, 2015 8:21 AM
-
Marked as answer by
I was trying to build a simple solution involving a Windows and a Console application. After using the wizard to generate the code skeleton for the projects, I didn’t add any code and just built the generated code. In both cases I got the same error:
1>c:cwinprwinprwinpr.cpp(4) : fatal error C1859: 'Debugwinpr.pch' unexpected precompiled header error, simply rerunning the compiler might fix this problem
What is wrong, any thoughts?
Dr1Ku
2,8303 gold badges47 silver badges54 bronze badges
asked Aug 7, 2012 at 21:34
2
There is a fix for Visual C++ 2008 SP1 compiler error C1859. You may download it here.
For details see this.
answered Aug 7, 2012 at 21:45
Jacob SeleznevJacob Seleznev
7,9803 gold badges22 silver badges34 bronze badges
7
We had something similar at work all of a sudden, one day. Our problem was down to this
A simple PC restart done it for me anyway.
answered Aug 7, 2012 at 21:39
0
The link provided in the answer above is no longer available.
I was getting the same error and in my case the problem was due to a ‘Windows Update‘ that required a restart (which I avoided the restart and kept getting this problem). But after the reboot the error was fixed.
answered Dec 29, 2014 at 20:46
SiaSia
1112 silver badges5 bronze badges
Installing visual C++ 2008 SP1 fixed my issue.
answered Mar 12, 2014 at 12:00
UserUser
3511 gold badge7 silver badges19 bronze badges
1
If you have #include<stdfafx.h>, try commenting it out like so //#include<stdfafx.h> as it may be the culprit behind your errors.
Quetzalcoatl
3,0172 gold badges17 silver badges27 bronze badges
answered Aug 7, 2012 at 21:45
ArtArt
1431 silver badge10 bronze badges
1
Категории
Новости сайта
C#
VideoLan VLC
C++
Ошибки
Звук
Видео
FFmpeg
English
Windows
Web
Графы
OpenGL
Отладка
Обработка изображений
Разработка игр
Работа с текстом
DirectX
Vulkan
Mac OS X
-
В статье описана реализация метода отражения Фонга и анизотропной модели Варда с использованием OpenGL 3. Также приводится пример использования карты с коэфициентами для анизотропной модели. читать…
-
В статье описан метод создания статической библиотеки lib по dll. Вам не нужны исходники dll файла для создания lib-ы. читать…
-
В статье описан метод удалённого управления VLC плеером и использования RC интерфейса. Также приведён пример кода на C#. читать…
Если используя precompiled header в Visual Studio 2008 вы столкнулись с проблемой:
fatal error C1859: 'Precompiled.pch' unexpected precompiled header error, simply rerunning the compiler might fix this problem.
То не стоит расстраиваться вам необходимо скачать и установить: Fix for Visual C++ 2008 SP1 compiler error C1859 или SP1
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=25785
http://www.microsoft.com/ru-ru/download/details.aspx?id=10986
Теги:
C++
Что означает «неожиданная ошибка скомпилированного заголовка»?
Я пытался создать простое решение, включающее Windows и консольное приложение. После использования мастера для создания скелета кода для проектов я не добавлял никакого кода и просто не сгенерировал сгенерированный код. В обоих случаях я получил ту же ошибку:
1>c:cwinprwinprwinpr.cpp(4) : fatal error C1859: 'Debugwinpr.pch' unexpected precompiled header error, simply rerunning the compiler might fix this problem
Что не так, какие-то мысли?
08 авг. 2012, в 00:15
Поделиться
Источник
Существует исправление для ошибки компилятора Visual С++ 2008 SP1 C1859. Вы можете скачать здесь.
Подробнее см. this.
Jacob Seleznev
07 авг. 2012, в 23:11
Поделиться
У нас было что-то подобное на работе внезапно, однажды. Наша проблема сводилась к this
Простой перезапуск ПК сделал это для меня в любом случае.
Science_Fiction
07 авг. 2012, в 22:54
Поделиться
Ссылка, представленная в выше > , больше не доступна.
Я получал ту же ошибку, и в моем случае проблема возникла из-за « Центра обновления Windows«, требующего перезагрузки (который я избегал перезагрузки и продолжал эту проблему). Но после перезагрузки ошибка была исправлена.
Sia
29 дек. 2014, в 22:40
Поделиться
Установка Visual С++ 2008 с пакетом обновления 1 (SP1) исправила мою проблему.
User
12 март 2014, в 12:08
Поделиться
Если у вас есть #include<stdfafx.h>, попробуйте прокомментировать его так //#include<stdfafx.h>, поскольку это может быть виновником ошибок.
Art
07 авг. 2012, в 23:07
Поделиться
Ещё вопросы
- 0статья получит неправильные категории в красноречивом laravel 5.5
- 1SVM регрессия быстрее в Python
- 1Удаление файла всегда заканчивается неудачей
- 1Метод в Vue запускается дважды по клику
- 0PHP htmlentities () не работает должным образом
- 0Форма PHP не отправляется на следующую страницу
- 0Ионная сборка iOS удаляет изменения
- 0перенаправить не www на www с .htaccess в yii
- 0Как мне вставить div и все его содержимое, используя ngAnimate?
- 0Загрузка дополнительных сообщений не работает
- 1Как перебрать DataFrame, если применить не будет без цикла for?
- 1Как нарисовать разделить подзаговор xaxis с несколькими yaxis с помощью Figure (matplotlib FigureCanvasQTAgg)?
- 0MySQL — добавить столбец во временные таблицы из другой таблицы
- 0HTML не полностью жидкий
- 0GMP неисправен алгоритм наивной простоты c ++
- 1Динамически загружать HTML на основе URL
- 1Пропустить цикл для списка Нет
- 0поверните URL изображения в теге img, чтобы предварительно загрузить все
- 1Файл json не создается с помощью Python Scrapy Spider
- 1Поток: генерирует тип объекта «Y» из типа объекта «X», где «Y» имеет все те же ключи, что и «X», но все типы являются строковыми
- 0Как поставить рамку вокруг всей клетки?
- 0Печать массива символов с использованием указателя на символ.
- 0Два «равных» объекта JavaScript не равны
- 1JSON как параметр формы
- 1только значок на вкладках
- 0Можем ли мы произвести оплату с помощью «Делать прямой метод» Paypal, используя номер карты, сумму и срок действия только в PHP [закрыт]
- 0preg_replace несколько строк в скобках (php / regex)
- 1ListActivity с курсором
- 1Попытка проверить соединение на локальных портах с помощью Socket и получить ConnectException
- 1Отправка объекта сериализации protobuf из C # на сервер Java не работает?
- 1Как удвоить буфер прямоугольников
- 0разделите URL и получите значение
- 1Использование лямбда-выражения для назначения данных ViewModel в запросе с использованием .Find ()
- 0Реализация развертывания и свертывания в представлениях Rails
- 0Печать и перенаправление документа PDF
- 0Как включить удаленный вход в систему для mysql.?
- 1SAX разбор в андроиде
- 1Как элегантно сделать пользовательскую ошибку утверждения?
- 1Запретить привязку функции более одного раза
- 1ModuleNotFoundError: нет модуля с именем tenensflow.contrib.framework
- 0Прокрутите массив php и вставьте ключ => значение в указанной позиции
- 0Рекурсивная функция для проверки цифр
- 1многопроцессорность дает AssertionError: демоническим процессам не разрешено иметь детей
- 0Цикл по полям с помощью jQuery Validation
- 1Должен ли я использовать имя пакета или имя класса, чтобы представить концепцию?
- 1Проблемы с загрузкой с угловым 4 и как node-rdkafka и kafka-node
- 0перебрать 10 дней и сохранить каждую дату в массиве
- 0Доля Google Plus счетчик всегда показывает ноль
- 1el.style.setProperty против el.style.property
- 1MultipartConfig аннотация / сервлет конфигурации

-
#1
Hey. I created a new class in the game source. However when I try to compile, I get «unexpected precompiled header error», simply rerunning the compiler might fix this problem (it doesn’t).
Tried clean -> build, doesn’t fix.
How would I fix this? Thank you. I’m sure I have to edit the CvGameCoreDLL_Expansion2Wind32Mod.pch somehow to add my class in, but I don’t know how to do that.
Any help would be appreciated.
I’m also very nervous to do something via google in the fear of breaking the DLL since this is very delicate. In the past I’ve modified existing classes, now I’m looking to add to the DLL.
-
#2
I think it is because the DLL wants to have a reference to all header files (I assume you added a CvClassName.h header as part of your class) in the CvGameCoreDLLPCH.h file. Just add an #include directive at the end of that (right before the «using namespace fastdelegate» line) and it should work.
-
#3
I think it is because the DLL wants to have a reference to all header files (I assume you added a CvClassName.h header as part of your class) in the CvGameCoreDLLPCH.h file. Just add an #include directive at the end of that (right before the «using namespace fastdelegate» line) and it should work.
I do have a include in there with the correct class name.
-
#4
Every now and again my build does that, I just run clean, exit VS-2010, restart and rebuild — usually fixes it
-
#5
Every now and again my build does that, I just run clean, exit VS-2010, restart and rebuild — usually fixes it
Okay, thanks. Thank took care of the compile issues.
I got scared like they wouldn’t let us put a new class into the DLL….
-
#6
Tested in game. My database is loading fine (whether or not it’s being accepted into the C++ I don’t know, I have to test that), but my custom class isn’t producing any errors and the game isn’t crashing.
Thanks for the help guys.
-
#7
The entire options system in my DLL uses a custom class to load values from the DB and cache them in memory — no problems there.
-
#8
The entire options system in my DLL uses a custom class to load values from the DB and cache them in memory — no problems there.
Mhmm. I have no problems on my end either. Everything is smooth sailing.
-
#9
Reviving this thread because the error message came up in my search. I’m trying to compile unmodded dll (expansion 2) for the first time. Followed steps 1 — 11 in the «How to compile dll» page. Got a page full of the error below. Same thing when I tried the other two dlls.
Tried a second time and got a shorter list:
Additional builds didn’t change after that.
Every now and again my build does that, I just run clean, exit VS-2010, restart and rebuild — usually fixes it
Tried this (except it’s VS-2008). It just went back to the long error list. And then the shorter list when I ran it again.
Appreciate any tips… (looking forward to modding dll so I can stop building my Rube Goldberg Lua hacks)
-
#11
Well…, Google is your best friend in these situations. Apparently there is a nasty incompatibility between VS-2008 and Windows 7. Should be fixed in VS-2010.
Just a question before I install another VS. Is there any reason for me to install VS-2010 rather than VS-2012? The expansion2 dll (which is the only one I will ever mod) has solution files for 08, 10 and 12.
-
#12
Just a question before I install another VS. Is there any reason for me to install VS-2010 rather than VS-2012? The expansion2 dll (which is the only one I will ever mod) has solution files for 08, 10 and 12.
Post #99 and #100 in the DLL thread imply that it should work, but there is no follow up from anyone to say that it actually did (but conversely there is no rant to say it didn’t 
-
#13
I suppose this will apply also for VS-2012:
If you want to use VS-2010 to build the DLL (which I was) you need to install VS-2008 FIRST and then VS-2010 (installing VS-2008 after VS-2010 because you forgot to do it doesn’t seem to work!)
I’ll report back in the DLL thread if this works out…
-
#14
Every now and again my build does that, I just run clean, exit VS-2010, restart and rebuild — usually fixes it
This problem still happens occasionally with VS Community 2015, and whoward69’s solution still works!
|
979 / 196 / 33 Регистрация: 26.09.2012 Сообщений: 2,041 |
|
|
1 |
|
|
09.08.2015, 00:50. Показов 11826. Ответов 4
есть файл с расширением .с, раньше этот файл компилировался без проблем, я его удалил и добавил новый и сейчас он не компилируется, а выводится ошибка: Добавлено через 14 минут
0 |
|
2549 / 1208 / 358 Регистрация: 30.11.2013 Сообщений: 3,826 |
|
|
09.08.2015, 00:57 |
2 |
|
кажись в таких моментах надо удалять папку Debug для полной пересборке проекта
1 |
|
979 / 196 / 33 Регистрация: 26.09.2012 Сообщений: 2,041 |
|
|
09.08.2015, 01:39 [ТС] |
3 |
|
кажись в таких моментах надо удалять папку Debug для полной пересборке проекта Удалял две папки дебаг ниче не помогало Добавлено через 1 минуту Добавлено через 3 минуты
0 |
|
939 / 867 / 355 Регистрация: 10.10.2012 Сообщений: 2,706 |
|
|
09.08.2015, 01:51 |
4 |
|
2 |
|
979 / 196 / 33 Регистрация: 26.09.2012 Сообщений: 2,041 |
|
|
09.08.2015, 02:09 [ТС] |
5 |
|
lss, ага ясно, на уровне файла заголовки отключены в проекте который создается по умолчанию, а я для всего отключил. Не знал что есть два уровня. Добавлено через 1 минуту
0 |



