Microsoft KB Archive/114876

BUG: Dependencies May Not Be Detected PSS ID Number: Q114876 Article last modified on 08-12-1994

1.0 1.5 | 1.0

WINDOWS | WINDOWS NT

= SYMPTOMS =

When a project includes header files that include each other, not all of the dependencies are detected. This can cause the Visual WorkBench to report that a source file is up to date when it is not up to date.

= RESOLUTION =

It may be necessary to include some header files directly in the source file, instead of in a header file. Please see the MORE INFORMATION section for details.

= STATUS =

Microsoft has confirmed this to be a bug in the Visual WorkBench for Windows, versions 1.0 and 1.5, and the Visual WorkBench for Windows NT, version 1.1. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

= MORE INFORMATION =

Situation 1
The problem can be demonstrated in the following situation:

// sample1.cpp


 * 1) include “sample1.h”

// sample2.cpp


 * 1) include “sample2.h”

// sample1.h


 * 1) ifndef _SAMPLE1_H #define _SAMPLE1_H #include “sample2.h” #include “test1.h” #endif

// sample2.h


 * 1) ifndef _SAMPLE2_H #define _SAMPLE2_H #include “sample1.h” #include “test2.h” #endif

// test1.h // nothing required for this sample.

// test2.h // nothing required for this sample.

The dependencies generated for this .MAK file will be:

SAMPLE1_DEP =

c:1.h c:2.h c:2.h c:1.h

SAMPLE2_DEP =

c:2.h c:1.h c:2.h

SAMPLE2_DEP should also include c:1.h

Situation 2
The correct dependencies are generated with the following changes:

// sample1.cpp


 * 1) include “test2.h” #include “sample1.h”

// sample2.cpp


 * 1) include “test1.h” #include “sample2.h”

// All other files are unchanged.

Additional reference words: 1.00 1.50 KBCategory: Tls KBSubCategory:

=
================================================================

Copyright Microsoft Corporation 1994.