Solved

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

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
 shows up in Outlook, not OWA or on phone 3 68
Problem to echo 6 95
How to get statistic's from a competitors website?! 1 103
c++, dynamic object by json 1 41
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

813 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