I added some source files I got from someone else into my project and the compiler gives the error “C1010: unexpected end of file while looking for precompiled header directive.” Why?
By default, Visual C++ projects use precompiled headers. This is a system whereby the large Windows headers are compiled only once when you build stdafx.cpp. Every other .CPP file in your project needs to #include “stdafx.h” as the first #include in order to build. The compiler specifically looks for the name “stdafx.h” to know when to insert the precompiled header information. If you received the source for an entire program from someone else, and you want to build it as a Visual C++ project, you can turn off precompiled headers instead. In your project options, go to the C/C++ tab and select the Precompiled headers category. Click the Not using precompiled headers radio button, then click OK.
Related Questions
- I added some source files I got from someone else into my project and the compiler gives the error "C1010: unexpected end of file while looking for precompiled header directive." Why?
- Should all the Java files or classes in my application be added to JCover project to perform coverage analysis?
- WME9 gives me an error when I try to use Avisynth script as source. Does WME9 not support .avs input?