BUG: Scan All Dependencies May Fail to Include Files

Last reviewed: July 22, 1997
Article ID: Q114835
1.00 1.50 WINDOWS kbtool kbbuglist

The information in this article applies to:

  • The Microsoft Visual Workbench included with: Microsoft Visual C++ for Windows, versions 1.0 and 1.5

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:

  • Include the full path in the Include Files Path edit field in the Directories dialog box under the Options menu.

    -or-

  • Include the full path within the double quote rather than just the root filename.

    -or-

  • Move the header file into the current working directory.

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

  • Choose the Options menu.

  • Select Project.

  • Choose the Compiler button.

  • Select the Preprocessor category

  • 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 reference words: 1.00 1.50
    KBCategory: kbtool kbbuglist
    KBSubcategory: VWBIss
    Keywords : kb16bitonly


    THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

    Last reviewed: July 22, 1997
    © 1998 Microsoft Corporation. All rights reserved. Terms of Use.