fatal error C1010: unexpected end of file while looking for precompiled header.
-
Tuesday, September 18, 2007 10:21 PM
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!
All Replies
-
Tuesday, September 18, 2007 11:29 PMModerator
"Did you forget to add #include "stdafx.h" to your source"? -
Tuesday, October 09, 2007 2:59 PMI 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 5:38 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.
- Proposed As Answer by Mungyun Friday, October 07, 2011 7:40 PM
-
Tuesday, October 09, 2007 6:48 PM
Where is
'Configuration Properties'?
Thanks
- Proposed As Answer by Prizzy29 Monday, October 26, 2009 7:27 AM
-
Tuesday, June 24, 2008 9:55 AM
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? -
Monday, October 26, 2009 7:30 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.- Proposed As Answer by SANJAY KHACHANE Wednesday, June 06, 2012 10:58 AM
- Unproposed As Answer by SANJAY KHACHANE Wednesday, June 06, 2012 10:59 AM
- Proposed As Answer by SANJAY KHACHANE Wednesday, June 06, 2012 10:59 AM
-
Wednesday, June 06, 2012 11:06 AM
Go To
I am using Visual Studio 2010.
Clicked New Project --> Visual C++ --> Win32 Console Application -->
Enter Name Of Application---> Click Ok
Show "Win32 Application Wizard" -- > Click Next -->
In Scrine Show
Additional options:
Empty project
Export symbols
Precompiled header
Untick Precompiled Header
then Finished It
- Edited by SANJAY KHACHANE Wednesday, June 06, 2012 11:08 AM
-
Thursday, September 20, 2012 11:05 AM
Hi..ardmore,
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”
- Edited by Mayur.Dabhi Thursday, September 20, 2012 11:06 AM
-
Monday, December 31, 2012 7:21 AMThank you soo much.. its works fine steve

