fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
I am using Visual Studio 2005 Academic Edition.
I clicked "Tool"=>Options=>Debugging=>Edit and Continue.
Let "Allow precomping" unchecked then.
Why does this error occury?
Thanks!Tuesday, September 18, 2007 10:21 PM
I have generated source code and was trying to compile in release mode (instead of debug). I got this error. Putting in the #include "stdafx.h" does not fix the problem. Anyone know what is going on and why I am getting this error in Release mode and not in Debug mode?Tuesday, October 09, 2007 2:59 PM
I figured out what the problem was. The entire project needed to be marked as 'Not Using Precompiled Headers' in the property pages. This is under the 'Configuration Properties'->C/C++->'Precompiled Headers'. You could just single out the one file if you wanted to also.
I then was getting some linker unresolved external errors after doing that. Make sure you also check for any libraries that need to be linked against. I had (NOINHERIT) in my Additional Dependencies field of the properties. That field is under the 'Configuration Properties'->Linker->Input.
Just wanted to put on the board what I found in case anyone else has these easy setup issues. These things are different from what I am used to or at least in different places.
Tuesday, October 09, 2007 5:38 PM
- Proposed as answer by Mungyun Friday, October 07, 2011 7:40 PM
The Steve340 wrote: I have generated source code and was trying to compile in release mode (instead of debug). I got this error. Putting in the #include "stdafx.h" does not fix the problem. Anyone know what is going on and why I am getting this error in Release mode and not in Debug mode?Tuesday, June 24, 2008 9:55 AM
Once the C++ is open in a project = Tools/options/”edit/countine” you click on the left side / and then close to the bottom is the option to add or remove 'Precompiled Headers' I had an issue, where there 'Precompiled Headers' came out of no where, I didn't even chose it but, I googled the issue and came up with the site. An I read the idea's on here an searched for it in C++ search and it told me how to do. An I thought I would share the little info.Monday, October 26, 2009 7:30 AM
I was having same problem, but solved it by following manner..
Open property of that particular page and go to confi. Property -> c/c++ -> precompiled headers -> set this value to “Not using precompiled Headers”
Thursday, September 20, 2012 11:05 AM
- Edited by Mayur.Dabhi Thursday, September 20, 2012 11:06 AM