Solved

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

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

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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
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)

743 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

12 Experts available now in Live!

Get 1:1 Help Now