Solved

Unable to compile a cpp file

Posted on 1998-10-19
3
245 Views
Last Modified: 2010-04-02
Hi,
I kept on receiving this error message when I try to compile my CPP file "fatal error C1010: unexpected end of file while looking for precompiled header directive". This still happens when I try to clean the directory and recompile all files. I am thus unable to build an executable.
0
Comment
Question by:wmlim060298
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
thresher_shark earned 30 total points
ID: 1175588
Add:

#include "stdafx.h"

to the top of the source file having this difficulty.

If you have any further questions regarding this issue, please feel free to ask.  Thanks!
0
 

Author Comment

by:wmlim060298
ID: 1175589
Thanks ! I actually tried to include this header just before your answer came.
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1175590
Glad it all worked out!

Just out of curiousity, why'd you give me a 'B' then?  I just want to try to improve my answers for in the future.  Thanks!
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question