BUG: Scan All Dependencies May Fail to Include Files

ID: Q114835


The information in this article applies to:


SYMPTOMS

Choosing Scan All Dependencies from the Project menu causes Visual Workbench to generate a dependency list for the current makefile, which is used to determine the files that need to be rebuilt. Header files that are included within double quotes may not be included in the dependency list generated by the Visual Workbench if the header files are located outside of the directory where the source files are located. This problem occurs if the path for the dependency is included using the /I compiler switch. If you modify the header file and choose Build from the Project menu, the appropriate source files are not recompiled as expected.


RESOLUTION

There are a few ways to work around this problem:


STATUS

Microsoft has confirmed this to be a bug in the products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

This problem does not occur in the Visual Workbench 32-bit, version 1.1.


MORE INFORMATION

Start with a project that consists of the following files:


// TEST.CPP
   #include <iostream.h>
   #include "test.h"
   void main() {
      cout << TESTING << endl;
   }
// TEST.H
   #define TESTING  "testing" 
Have Visual Workbench generate the following makefile:

   C:\TEST\TEST.MAK 
  1. Choose the Options menu.


  2. Select Project.


  3. Choose the Compiler button.


  4. Select the Preprocessor category


  5. Enter C:\H under Include Path.


The file TEST.CPP is not recompiled once TEST.H is modified and Build is chosen from the Project menu.

The project can be correctly rebuilt in the following three situations:
if TEST.CPP is modified as suggested in the RESOLUTION section of the article, so that it appears as follows:

      // TEST.CPP
         #include "c:\h\test.h"
         void main() {
            cout << TESTING << endl;
         } 
-or-

if C:\H is added to the Include Files Path that is found by choosing the Options menu and selecting Directories
-or-
if TEST.H is moved into the C:\TEST directory.

Additional query words: 1.00 1.50


Keywords          : kb16bitonly 
Version           : 
Platform          : 
Issue type        : 

Last Reviewed: July 22, 1999