Microsoft KB Archive/117888

= FIX: Relative Include Files May Not be a Dependency =

Article ID: 117888

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft Visual Workbench for Windows

-



This article was previously published under Q117888



SYMPTOMS
Dependendcies to files that are included using a relative reference such as, #include "\include\test.h" will not be generated when a Scan All Dependencies is performed on a project.



RESOLUTION
Adding the project root directory to one of the Include file paths (under Options.Directories or Options.Project.Compiler.Preprocessor) AND changing the #include statement to remove the leading backslash (such as in "include\test.h") will resolve this problem. Additionally, specifying the entire path to the include file will alleviate this problem.



STATUS
Microsoft has confirmed this to be a bug in the products listed above. This problem was corrected in Visual C++ 2.0.



MORE INFORMATION
The following sample code will not include test1.h as a project dependency.

Sample Code
/* Compile options needed:  none


 * 1) include "\include\test1.h"
 * 2) include "test.h"

void main {}

Additional query words: 1.00 1.10

Keywords: kbbug kbfix kbide KB117888

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.