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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Visual Studio error

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
When trying to compile a program in MS Visual Studio, I get the following error:

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

I've tried loading old programs that should compile fully but they get the same error. I have a program due tomorrow and if I don't get this fixed I'm screwed.

Any ideas?
 
With the /Yu pre-compiled header option, the compiler looks for the specified file - normally stdafx.h - in each source module being compiled. Everything up to and included in this file is considered part of the precompiled header. Any headers which you do not wish to be continually recompiled (e.g., windows.h is usually a good candidate) should be included in stdafx.h (or whatever) and will only be recompiled when this file is changed. The error occurs because the specified file was not found within the source module. Probably you need an #include "stdafx.h" at the start of the module in error, or you can remove the /Yu option from the project compiler settings. :) Hope that this helped! ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top