Solved

Unable to compile a cpp file

Posted on 1998-10-19
3
247 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
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 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…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

751 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