Microsoft KB Archive/119278

BUG: Dependency List in Makefile Incorrectly Generated PSS ID Number: Q119278 Article last modified on 08-26-1994

1.00 1.50 | 1.10

WINDOWS | WINDOWS NT

= SYMPTOMS =

The header file that is included with a particular .CPP file in a project may not be listed in the dependency macros in the project’s makefile.

= STATUS =

Microsoft has confirmed this to be a bug with 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 =

To reproduce the problem, use the following files and open a new project using the Visual Workbench. First add the file TESTERR1.CPP to the project, then add TESTERR2.CPP to the project.

// TESTERR1.CPP

#include &quot;testerr1.hpp&quot; #include &quot;testerr2.hpp&quot; // TESTERR2.CPP

#include &quot;testerr2.hpp&quot; // TESTERR1.HPP

#ifndef __TESTERR1_HPP__ #define __TESTERR1_HPP__ #include &quot;testerr3.hpp&quot; #endif // TESTERR2.HPP

#ifndef __TESTERR2_HPP__ #define __TESTERR2_HPP__ #include &quot;testerr3.hpp&quot; #endif // TESTERR3.HPP

#ifndef __TESTERR3_HPP__ #define __TESTERR3_HPP__ #include &quot;testerr4.hpp&quot; #endif // TESTERR4.HPP

int i; The dependency macros created by the Visual Workbench, which are located in the project’s makefile (for example, TEST.MAK), are as follows:

TESTERR1_DEP = C:1.HPP

C:3.HPP

C:4.HPP

C:2.HPP

TESTERR2_DEP = C:2.HPP

C:3.HPP

The header file TESTERR4.HPP should be listed as part of the TESTERR2_DEP macro, but it has been excluded.

To work around the problem, remove the two .CPP files from the project list and add them again, but in the reverse order (that is, add TESTERR2.CPP first and then TESTERR1.CPP). The dependency macros will then be correct and will be set as follows:

TESTERR2_DEP = C:2.HPP

C:3.HPP

C:4.HPP

TESTERR1_DEP = C:1.HPP

C:3.HPP

C:4.HPP

C:2.HPP

Additional reference words: 1.00 1.50 1.10 KBCategory: Tls KBSubCategory: VWBIss

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

Copyright Microsoft Corporation 1994.