- Исправить ошибки с StdAfx.h (как скачать и исправить)
- Обзор файла
- Что такое сообщения об ошибках StdAfx.h?
- Общие ошибки выполнения StdAfx.h
- Как исправить ошибки StdAfx.h — 3-шаговое руководство (время выполнения:
- Шаг 1. Восстановите компьютер до последней точки восстановления, «моментального снимка» или образа резервной копии, которые предшествуют появлению ошибки.
- Шаг 2. Если вы недавно установили приложение MSI Afterburner (или схожее программное обеспечение), удалите его, затем попробуйте переустановить MSI Afterburner.
- Шаг 3. Выполните обновление Windows.
- Если эти шаги не принесут результата: скачайте и замените файл StdAfx.h (внимание: для опытных пользователей)
- What is “stdafx.h” used for in Visual Studio?
- 4 Answers 4
- Difference between windows.h | stdafx.h
- 1 Answer 1
- The header «Windows.h»
- The header » stdafx.h «
- Handling stdafx.h in cross-platform code
- 10 Answers 10
Исправить ошибки с StdAfx.h (как скачать и исправить)
Последнее обновление: 05/14/2020 [Требуемое время для чтения: 3,5 мин.]
Файлы C/C++/Objective-C Header, такие как StdAfx.h, считаются разновидностью файла Разработчик (C/C++/Objective-C Header). Они соотносятся с расширением H, разработанным компанией Micro-Star International для MSI Afterburner 4.6.0.
Файл StdAfx.h изначально был выпущен с DownloadX ActiveX Download Control 1.6.8 05/19/2014 для ОС Windows 10. 03/09/2019 вышла версия 4.6.0 для MSI Afterburner 4.6.0.
Продолжайте читать, чтобы найти загрузку правильной версии файла StdAfx.h (бесплатно), подробные сведения о файле и порядок устранения неполадок, возникших с файлом H.
Рекомендуемая загрузка: исправить ошибки реестра в WinThruster, связанные с StdAfx.h и (или) MSI Afterburner.
Совместимость с Windows 10, 8, 7, Vista, XP и 2000
Средняя оценка пользователей
Обзор файла
Общие сведения ✻ | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Имя файла: | StdAfx.h | |||||||||||||||||||||||
Расширение файла: | расширение H | |||||||||||||||||||||||
Тип файла: | Разработчик | |||||||||||||||||||||||
Описание: | C/C++/Objective-C Header | |||||||||||||||||||||||
Пользовательский рейтинг популярности: |
Сведения о разработчике и ПО | |
---|---|
Программа: | MSI Afterburner 4.6.0 |
Разработчик: | Micro-Star International |
Программное обеспечение: | MSI Afterburner |
Версия ПО: | 4.6.0 |
Сведения о файле | |
---|---|
Размер файла (байты): | 1146 |
Дата первоначального файла: | 10/21/2019 |
Дата последнего файла: | 01/24/2020 |
Информация о файле | Описание |
---|---|
Размер файла: | 1146 bytes |
Дата и время изменения файла: | 2020:01:24 03:13:20+00:00 |
✻ Фрагменты данных файлов предоставлены участником Exiftool (Phil Harvey) и распространяются под лицензией Perl Artistic.
Что такое сообщения об ошибках StdAfx.h?
Общие ошибки выполнения StdAfx.h
Ошибки файла StdAfx.h часто возникают на этапе запуска MSI Afterburner, но также могут возникать во время работы программы. Эти типы ошибок H также известны как «ошибки выполнения», поскольку они возникают во время выполнения MSI Afterburner. К числу наиболее распространенных ошибок выполнения StdAfx.h относятся:
- Не удается найти StdAfx.h.
- StdAfx.h — ошибка.
- Не удалось загрузить StdAfx.h.
- Ошибка при загрузке StdAfx.h.
- Не удалось зарегистрировать StdAfx.h / Не удается зарегистрировать StdAfx.h.
- Ошибка выполнения — StdAfx.h.
- Файл StdAfx.h отсутствует или поврежден.
Программа: C:\Program Files (x86)\MSI Afterburner\SDK\Samples\SharedMemory\MACMSharedMemorySample\StdAfx.h
Среда выполнения получила запрос от этого приложения, чтобы прекратить его необычным способом.
Для получения дополнительной информации обратитесь в службу поддержки приложения.
В большинстве случаев причинами ошибок в H являются отсутствующие или поврежденные файлы. Файл StdAfx.h может отсутствовать из-за случайного удаления, быть удаленным другой программой как общий файл (общий с MSI Afterburner) или быть удаленным в результате заражения вредоносным программным обеспечением. Кроме того, повреждение файла StdAfx.h может быть вызвано отключением питания при загрузке MSI Afterburner, сбоем системы при загрузке или сохранении StdAfx.h, наличием плохих секторов на запоминающем устройстве (обычно это основной жесткий диск) или заражением вредоносным программным обеспечением. Таким образом, крайне важно, чтобы антивирус постоянно поддерживался в актуальном состоянии и регулярно проводил сканирование системы.
Как исправить ошибки StdAfx.h — 3-шаговое руководство (время выполнения:
Если вы столкнулись с одним из вышеуказанных сообщений об ошибке, выполните следующие действия по устранению неполадок, чтобы решить проблему StdAfx.h. Эти шаги по устранению неполадок перечислены в рекомендуемом порядке выполнения.
Шаг 1. Восстановите компьютер до последней точки восстановления, «моментального снимка» или образа резервной копии, которые предшествуют появлению ошибки.
Чтобы начать восстановление системы (Windows XP, Vista, 7, 8 и 10):
- Нажмите кнопку «Пуск» в Windows
- В поле поиска введите «Восстановление системы» и нажмите ENTER.
- В результатах поиска найдите и нажмите «Восстановление системы»
- Введите пароль администратора (при необходимости).
- Следуйте инструкциям мастера восстановления системы, чтобы выбрать соответствующую точку восстановления.
- Восстановите компьютер к этому образу резервной копии.
Если на этапе 1 не удается устранить ошибку StdAfx.h, перейдите к шагу 2 ниже.
Шаг 2. Если вы недавно установили приложение MSI Afterburner (или схожее программное обеспечение), удалите его, затем попробуйте переустановить MSI Afterburner.
Чтобы удалить программное обеспечение MSI Afterburner, выполните следующие инструкции (Windows XP, Vista, 7, 8 и 10):
- Нажмите кнопку «Пуск» в Windows
- В поле поиска введите «Удалить» и нажмите ENTER.
- В результатах поиска найдите и нажмите «Установка и удаление программ»
- Найдите запись для MSI Afterburner 4.6.0 и нажмите «Удалить»
- Следуйте указаниям по удалению.
После полного удаления приложения следует перезагрузить ПК и заново установить MSI Afterburner.
Если на этапе 2 также не удается устранить ошибку StdAfx.h, перейдите к шагу 3 ниже.
MSI Afterburner 4.6.0
Шаг 3. Выполните обновление Windows.
Когда первые два шага не устранили проблему, целесообразно запустить Центр обновления Windows. Во многих случаях возникновение сообщений об ошибках StdAfx.h может быть вызвано устаревшей операционной системой Windows. Чтобы запустить Центр обновления Windows, выполните следующие простые шаги:
- Нажмите кнопку «Пуск» в Windows
- В поле поиска введите «Обновить» и нажмите ENTER.
- В диалоговом окне Центра обновления Windows нажмите «Проверить наличие обновлений» (или аналогичную кнопку в зависимости от версии Windows)
- Если обновления доступны для загрузки, нажмите «Установить обновления».
- После завершения обновления следует перезагрузить ПК.
Если Центр обновления Windows не смог устранить сообщение об ошибке StdAfx.h, перейдите к следующему шагу. Обратите внимание, что этот последний шаг рекомендуется только для продвинутых пользователей ПК.
Если эти шаги не принесут результата: скачайте и замените файл StdAfx.h (внимание: для опытных пользователей)
Если ни один из предыдущих трех шагов по устранению неполадок не разрешил проблему, можно попробовать более агрессивный подход (примечание: не рекомендуется пользователям ПК начального уровня), загрузив и заменив соответствующую версию файла StdAfx.h. Мы храним полную базу данных файлов StdAfx.h со 100%-ной гарантией отсутствия вредоносного программного обеспечения для любой применимой версии MSI Afterburner . Чтобы загрузить и правильно заменить файл, выполните следующие действия:
- Найдите версию операционной системы Windows в нижеприведенном списке «Загрузить файлы StdAfx.h».
- Нажмите соответствующую кнопку «Скачать», чтобы скачать версию файла Windows.
- Скопируйте этот файл в соответствующее расположение папки MSI Afterburner:
Если этот последний шаг оказался безрезультативным и ошибка по-прежнему не устранена, единственно возможным вариантом остается выполнение чистой установки Windows 10.
What is “stdafx.h” used for in Visual Studio?
A file named stdafx.h is automatically generated when I start a project in Visual Studio 2010. I need to make a cross-platform C++ library, so I don’t/can’t use this header file.
What is stdafx.h used for? Is it OK that I just remove this header file?
4 Answers 4
All C++ compilers have one serious performance problem to deal with. Compiling C++ code is a long, slow process.
Compiling headers included on top of C++ files is a very long, slow process. Compiling the huge header structures that form part of Windows API and other large API libraries is a very, very long, slow process. To have to do it over, and over, and over for every single Cpp source file is a death knell.
This is not unique to Windows but an old problem faced by all compilers that have to compile against a large API like Windows.
The Microsoft compiler can ameliorate this problem with a simple trick called precompiled headers. The trick is pretty slick: although every CPP file can potentially and legally give a sligthly different meaning to the chain of header files included on top of each Cpp file (by things like having different macros #define’d in advance of the includes, or by including the headers in different order), that is most often not the case. Most of the time, we have dozens or hundreds of included files, but they all are intended to have the same meaning for all the Cpp files being compiled in your application.
The compiler can make huge time savings if it doesn’t have to start to compile every Cpp file plus its dozens of includes literally from scratch every time.
The trick consists of designating a special header file as the starting point of all compilation chains, the so called ‘precompiled header’ file, which is commonly a file named stdafx.h simply for historical reasons.
Simply list all your big huge headers for your APIs in your stdafx.h file, in the appropriate order, and then start each of your CPP files at the very top with an #include «stdafx.h» , before any meaningful content (just about the only thing allowed before is comments).
Under those conditions, instead of starting from scratch, the compiler starts compiling from the already saved results of compiling everything in stdafx.h .
I don’t believe that this trick is unique to Microsoft compilers, nor do I think it was an original development.
For Microsoft compilers, the setting that controls the use of precompiled headers is controlled by a command line argument to the compiler: /Yu «stdafx.h» . As you can imagine, the use of the stdafx.h file name is simply a convention; you can change the name if you so wish.
In Visual Studio 2010, this setting is controlled from the GUI via Right-clicking on a CPP Project, selecting ‘Properties’ and navigating to «Configuration Properties\C/C++\Precompiled Headers». For other versions of Visual Studio, the location in the GUI will be different.
Note that if you disable precompiled headers (or run your project through a tool that doesn’t support them), it doesn’t make your program illegal; it simply means that your tool will compile everything from scratch every time.
If you are creating a library with no Windows dependencies, you can easily comment out or remove #include s from the stdafx.h file. There is no need to remove the file per se, but clearly you may do so as well, by disabling the precompile header setting above.
Difference between windows.h | stdafx.h
I try to learn how to create a .DLL dynamic link library, the book I read is not current, and it tells how to make a .DLL for windows 32 bits. I use VS 2017 PRO, the book is narrated with VS 2013.
in the book SC starts like this
and when I try to adapt to VS 2017 PRO my project is a .DLL dynamic link library EMPTY so it looks like this.
What is the difference between these two ** HEADERS ** (headers)
1 Answer 1
What is the difference between these two ** HEADERS ** (headers)
Everything.In fact, it is as if you were asking the difference between the instruction manual of a car and a cereal bar.
The header «Windows.h»
Contains the declarations of all library functions Windows API, all the macros used by the programmers of applications for Windows, and all the data structures used in a large number of functions and subsystems.
Broadly speaking, it is the header needed to communicate your program with the Windows operating system.
The header » stdafx.h «
Since the compilation of programs in C ++ and C language is very slow 1 , some compilers use tricks to speed up compilation times, one of these tricks are the pre-compiled headers
A header that is compiled to an intermediate form that is faster to process by the compiler. The use of pre-compiled headers can significantly reduce compile time, especially when applied to large headers or headers that include other headers.
Broadly speaking, it is the header to which all the headers you use in your program will go to be pre-compiled.
Handling stdafx.h in cross-platform code
I have a Visual Studio C++ based program that uses pre-compiled headers ( stdafx.h ). Now we are porting the application to Linux using gcc 4.x.
The question is how to handle pre-compiled header in both environments. I’ve googled but can not come to a conclusion.
Obviously I want leave stdafx.h in Visual Studio since the code base is pretty big and pre-compiled headers boost compilation time.
But the question is what to do in Linux. This is what I found:
- Leave the stdafx.h as is. gcc compiles code considerable faster than VC++ (or it is just my Linux machine is stronger . 🙂 ), so I maybe happy with this option.
Use approach from here — make stdafx.h look like (set USE_PRECOMPILED_HEADER for VS only):
Use the approach from here — compile VC++ with /FI to implicitly include stdafx.h in each cpp file. Therefore in VS your code can be switched easily to be compiled without pre-compiled headers and no code will have to be changed.
I personally dislike dependencies and the mess stdafx.h is pushing a big code base towards. Therefore the option is appealing to me — on Linux you don’t have stdafx.h , while still being able to turn on pre-compiled headers on VS by /FI only.
Your opinion? Are there other approaches to treat the issue?
10 Answers 10
You’re best off using precompiled headers still for fastest compilation.
You can use precompiled headers in gcc as well. See here.
The compiled precompiled header will have an extension appended as .gch instead of .pch .
So for example if you precompile stdafx.h you will have a precompiled header that will be automatically searched for called stdafx.h.gch anytime you include stdafx.h
Then compile as:
Your compilation will work even if you remove stdafx.h after step 1.
I used option 3 last time I needed to do this same thing. My project was pretty small but this worked wonderfully.
I’d either go for option 4 or option 2. I’ve experimented with precompiled headers on both various VS versions and GCC on Linux (blog posts about this here and here). In my experience, VS is a lot more sensitive to the length of the include paths, number of directories in the include path and the number of include files than G++ is. When I measured build times properly arranged precompiled headers would make a massive difference to the compile time under VS whereas G++ was pretty much unimpressed by this.
Actually, based on the above what I did the last time I worked on a project where this was necessary to rein in the compile time was to precompile the equivalent of stdafx.h under Windows where it made sense and simply used it as a regular file under Linux.
Very simple solution. Add a dummy file entry for «stdafx.h» in Linux environment.
I would only use option 1 in a big team of developers. Options 2, 3, and 4 will often halt the productivity of other members of your team, so you can save a few minutes a day in compile time.
Let’s assume that half of your developers use VS and half use gcc. Every now and then some VS developer will forget to include a header in a .cpp file. He won’t notice, because the stdafx.h implicitly includes it. So, he pushes his changes in the version control, and then a few other members of the gcc team will get compiler errors. So, for every 5 minutes-a-day you gain by using precompiled headers, 5 other people waste by fixing your missing headers.
If you don’t share the same code across all of your compilers, you will run into problems like that every day. If you force your VS developers to check for compilation on gcc before pushing changes, then you will throw away all your productivity gains from using precompiled headers.
Option 4 sounds appealing, but what if you want to use another compiler at some point in time ? Option 4 only works if you only use VS and gcc.
Notice that option 1 may make gcc compilation suffer a few seconds. Although it may not be noticeable.