Solved

VC++ 4.2: How do I specify an include directory?

Posted on 1997-05-07
1
206 Views
Last Modified: 2013-11-18
I have a header file in a directory outside of my project workspace directory that I would #include in one of my source files.  I have attempted to add this directory to my include search path by specifying it in:

        Build->Settings->Resources->Additional resource include directories:

Let's say the header files are in c: msdev\projects\generic\myheaders.  I specifyc:\msdev\projects\generic for the include directory.  Then in my .c file I include the file like this:

#include <myheaders/header1.h>

When I compile, I get the following error:

fatal error C1083: Cannot open include file: 'myheaders/header1.h': No such file or directory

Thanks in advance for the help.

-Mike
 bendi003@maroon.tc.umn.edu                                            
0
Comment
Question by:mbendic
[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
1 Comment
 

Accepted Solution

by:
rshek earned 50 total points
ID: 1163330
There are a few things you can try:

1. In the Build/Settings dialog, go to the C/C++ tab. From the Category drop-list, select Preprocessor. Put your additional include path in the edit box under "Additonal include directories". Spearate by a comma if more than 1 directory is required.

2. Force the update of dependencies by selecting from the menu bar Build/Update All Dependencies. Check all boxes. The source file window (don't know exactly what it is called), which list all of your project source files, should now have a Dependencies subfolder.

Hope this would help.

Rodney Shek

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

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
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