Solved

Visual C++ 6 cannot find include files.

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
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)

744 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

9 Experts available now in Live!

Get 1:1 Help Now