Solved

Visual C++ 6 cannot find include files.

Posted on 2006-07-08
3
257 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
[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
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

Industry Leaders: 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

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
In this post we will learn different types of Android Layout and some basics of an Android App.
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

740 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