Solved

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

Posted on 1997-05-07
1
203 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
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CSS HELP 6 90
Adding a hidden div to each row in a table 6 86
need help ...get stuck at middle of coding ...need to submit by Sunday C++ 1 37
Need some help with mailto 16 20
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
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 …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

839 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