Solved

Unable to compile a cpp file

Posted on 1998-10-19
3
246 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

808 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