fatal error C1010 - unexpected end of file while looking for precompiled header directive

There are two ways to resolve the error:
1. Type following line at start of your code file 
   #include "stdafx.h" 


2. Select 'Not Using Precompiled Headers' options under the precompiler headers option in project propertied.


 Main reason behind this error is MFC Programs use many libraries, requiring the use of many header files. To save time, the compiler tries to precompile most of these header files, and use the predigested data instead of reading through all of these header files on every compilation. The standard method for MFC programs is to lump all of these common header file references into one header file ("stdafx.h"). If you just have to ask what "stdafx" means, it comes from the early name of MFC, which was AFX (application framework). 

When compiling each source (.cpp) file, the 
compiler skips through the source code, looking for the directive: 

#include "stdafx.h" 
Once it finds this directive, it substitutes the precompiled header information and then begins compiling the rest of the file. If your source file doesn't contain this directive, you get the error.

Comments

Popular posts from this blog

How to boot Samsung Galaxy SL( GT-I9003) in recovery mode

How to flash CWM Recovery to Samsung Galaxy SL( GT-I9003) using Odin

How to Factory Reset or Hard Reset Samsung Galaxy SII ( GT-i9100)