Avatar of axtur
axtur
 asked on

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

I keep getting this message:

fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?

I'm using C, not C++, so do I still need to use the stdafx.h???

Here's the code:

http://img462.imageshack.us/img462/8370/codeoh0.jpg

http://img462.imageshack.us/img462/3596/code2lg6.jpg
C

Avatar of undefined
Last Comment
techbie

8/22/2022 - Mon
jkr

>>I'm using C, not C++, so do I still need to use the stdafx.h???

Yes, either that or turn off the use of precompiled headers in your project settings. "StdAfx.h" is the default file name for VC to generate these precompiled headers for, if you don't want that, you need to turn off that behaviour.
ASKER CERTIFIED SOLUTION
jkr

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
jkr

Still having trouble?
SOLUTION
techbie

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
techbie

I mean the C compiler.. (if you are using a C compiler)
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
jkr

>>Turn off the "Precompiled Header" option in the C++ compiler properties for
>>your project.

Um what in "Yes, either that or turn off the use of precompiled headers in your project settings." was misleading regarding that point?
techbie

there is no misleading in your answer jkr. i didnt notice it when I gave the answer.