Solved

Visual C++ 6 cannot find include files.

Posted on 2006-07-08
3
253 Views
Last Modified: 2013-11-20
I created a console app as I do not require full MFC support.  I have source files that the author of these files stated that all that is needed to compile the source (aside from adding them to the project) is to point VC++6 to the include directory using menu options Tools->Options->Directories.  I did that and when I try to compile I get the following error:

unexpected end of file while looking for precompiled header directive

All the includes are of the form <> instead of "" but that is the reason the author stated pointing VC++6 to the include directory was necessary.  In other projects I have done that successfully.

Thanks
0
Comment
Question by:techhound
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 17066754
>>unexpected end of file while looking for precompiled header directive

That means that the header file in question is missing a

#include "StdAfx.h"

directive. That is the file that VC++ tries to use as a default when generating preco,piled headers. So you could either add an (even empty) "StdAfx.h" to your project along with the #include directive or you could turn off using precompiled headers or set that to another header file in your project options (under C++|Precompiled Headers). I'd go for the 1st one.
0
 
LVL 3

Expert Comment

by:Raj_Kau
ID: 17070719
project->settings


then in project setting dialog box. select c/C++ tab
then in categery combo select precompiled hedears and then select second option
Automatic use of precompiled headers
leave the text box blank.



Raj
0
 
LVL 7

Expert Comment

by:nafis_devlpr
ID: 17080011
Actually just do a simple thing:
go to  project menu:

project->Add to Project->Files

then browse and the select the source files, then build the project. And presto, your project will be built and now you can run your program
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now