After chopping hands, the fraud call came before the express delivery was received. How to improve the privacy and security of e-commerce>>>
When compiling VC + + 6.0, a fatal error C1010: unexpected end of file while looking for precompiled header directive
appears
Solution:
1. If the error file is caused by adding other C code files into the current project, then Alt + F7 enter the settings of the current project, select the C/C + + tab, select precompiled headers from the category combo box, and select not using precompiled headers. Sure
2. Add:
?Include “StdAfx. H” at the beginning of the file
The description of precompiled header files is as follows:
precompilation of header files is to precompile some MFC standard header files (such as windows. H and afxwin. H) used in a project. When the project compiles later, it will not compile these header files, but only use the precompiled results. This can speed up compilation and save time
the precompiled header file is generated by compiling stdafx.cpp and named after the project name. Since the suffix of precompiled header file is “PCH”, the compilation result file is projectname.pch
the compiler uses the precompiled header file through a header file StdAfx. H. The header file name StdAfx. H can be specified in the compilation settings of the project. The compiler thinks that all the code before the instruction # include “StdAfx. H” is precompiled. It skips the # include “StdAfx. H” instruction and uses ProjectName. PCH to compile all the code after the instruction
therefore, the first statement of all CPP implementation files is: “include” StdAfx. H “
Similar Posts:
- [Solved] VS error C4996: ‘scanf’: This function or variable may be unsafe.
- [Solved] codeblocks Error: ‘to_string’ was not declared in this scope
- C Compilation Error: implicit declaration of function xxx is invalid in C99 [-Wimplicit-function-declaration]
- C1189 #error: “No Target Architecture”
- Linux: Environment Variables C_INCLUDE_PATH, CPLUS_INCLUDE_PATH, CPATH Common Error [How to Solve]
- [Solved] TypeError Error: Cannot read property ‘0’ of undefined
- [Solved] VS winsock.h and ws2def.h a large number of redefined error
- Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1
- [Solved] Go Gcc Compilation Error: gcc.exe fatal error no input files compilation terminated
- [Solved] Cannot Open “gl/glut.h” File Error: No such file or directory