Click to See Complete Forum and Search --> : compiler error about precompiled header.


August 23rd, 1999, 06:42 AM
Hello, gurus.

c:\projects\testthread\cfaststr.cpp(1455) : fatal error C1010: unexpected end of file while looking for precompiled header directive

This is an error message.
My situation is this.
I worte a class and I tested it in console program.
And it did work right but when I compiled in MFC exe program
the message above is popped.
I think is the problem is in the precompiled header file.
What do I have to do?
Need your help.

Roger Allen
August 23rd, 1999, 07:02 AM
You need to inluce the "stdafx.h" file into your .cpp file.

All .cpp ifles in a MFC project need to include this file.


Roger Allen aka [CB]RIGamortis, the quake2 monster.

dmadden
August 23rd, 1999, 07:10 AM
Try eliminating the switch [-Yu "stdafx.h"] from your Project|Settings|C++[Tab]|Project Options...

OR

Include the Pre-Compiled Header [#include "StdAfx.h"] to your .cpp file...

Here is the Error info found in the Help|Index under C1010:

************************************************************************************************
Fatal Error C1010
unexpected end of file while looking for precompiled header directive

A precompiled header was specified, but it did not contain a precompiled header directive.

This error can be caused by specifying an incorrect file as a header file, or by specifying an include file with the /Yu (Use Precompiled Header) command line option that is not listed in the source file as an include file.
************************************************************************************************


Thanks in advance,

Dan