BUG: Scan All Dependencies May Fail to Include FilesID: Q114835
|
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.
There are a few ways to work around this problem:
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.
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
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