Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what does this mean? 1

Status
Not open for further replies.

ryan

Programmer
Nov 13, 2000
73
US
Error: unexpected end of file while looking for precompiled header directive? I'm getting this when I'm trying to compile my program.

Thanks,
Ryan
 
I've gotten that a few times myself...I'm not sure if I remember correctly how I fixed it, but sometimes if you don't have a closing '}' or you are missing a ';' somewhere, this can come up. Check at the end of some of your functions for this and be sure you have all the corresponding '{' and '}' in your program.

Hope this helps

Niky Williams
NTS Marketing
 
ryank,

I believe it means you are missing #include "stdafx.h" as the 'first' include directive.

-pete
 
Yeah, I've had that hundreds of times. It was a while before I figgured it out. If you deleted that file, I think the only solution is to restart the project.
 
Sans,

> If you deleted that file, I think the only solution is to restart the project.

First, where is your source control? File should always be retrievable.

Second, many stdafx.h files are identical. You can usually get one to work from another project without having to restart your project.

Good luck
-pete
 
Forgive me, I'm a newbe. I just started programming in Visual C++ a week ago. You see, I figgured that all of these files were customized for your project name. But when I said delete the file, I ment off your hard disk.
 
Whoops! I thought the handle was a subject line! That's how it is in the other forums… Ignorance is the night of the mind
but without the light of a moon or star
 
> But when I said delete the file, I ment off your hard disk.

Sure, but if you are using source code control you can still retrieve the file from there.

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top