Share via


adding an existing header file to a project?

Question

Monday, October 22, 2012 9:13 PM

Hi -

I must be ignoring something obvious. I created a new object, added an existing source file, and two existing header files. One of the header files isn't being "seen." It is in a different directory from the source file, but the path to the location is in my PATH variable.

What could I be doing wrong here?

Thanks!

All replies (2)

Monday, October 22, 2012 9:20 PM âś…Answered | 1 vote

On 10/22/2012 5:13 PM, mzimmers wrote:

I must be ignoring something obvious. I created a new object, added an existing source file, and two existing header files. One of the header files isn't being "seen." It is in a different directory from the source file, but the path to the location is in my PATH variable.

#include directive doesn't look at PATH envionment variable, but at one named INCLUDE, if I recall correctly. Alternatively, you can add directories at Project | Properties | C/C++ | General | Additional Include Directories.

Igor Tandetnik


Monday, October 22, 2012 10:15 PM

Hi, Igor -

Thanks for the reply. I used the Additional Include Directories approach, and it seems to have worked. 

Edit: I notice that this change worked for my debug configuration, but didn't apply to my release configuration. Is this by design, or should I have done something differently?

Edit 2: never mind...I found the Configuration menu at the top of the property page.