Solved

Visual C++ 6 cannot find include files.

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
NotAlone Challenge 20 92
zeroMAx challenge 20 135
Cordova Camera plugin fails 2 192
how to use laptop or pad camera in vb.net windows application 2 129
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The viewer will learn how to dynamically set the form action using jQuery.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

734 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