INFO: Keeping #include Files Out of VWB Dependency ListLast reviewed: October 7, 1997Article ID: Q102390 |
The information in this article applies to:
SUMMARYBy default, the Visual Workbench includes files in the dependency list even if they are included between an #ifdef, #endif pair. In some situations, this behavior may be undesirable. The following article describes several ways to keep the files out of the dependency scanning process.
MORE INFORMATIONThe Visual Workbench scans a file for header file dependencies by looking for lines in a source file that have the form
#include <filename.h> -or- #include "filename.h"Because the dependency scanner does not have a preprocessor, it will include headers file in the dependency list even if they conditionally included using an #ifdef as shown below. For example, with the following code, the file "unixstuf.h" will be tagged as a dependency when the makefile is built:
#define _WIN32 #ifndef _WIN32 #include <sys/unixstuf.h> #endifTo get the desired behavior:
REFERENCESFor more information about SYSINCL.DAT with Visual C++ for Windows or Visual C++ 32-bit Edition, versions 1.0 and 2.x, choose Visual Workbench from the Visual Workbench Help menu and choose Search. Type "SYSINCL.DAT" and choose OK. For more information about SYSINCL.DAT or MSVCINCL.DAT with Visual C++ 32-bit Edition, version 4.0, search the Books Online for "updating dependencies". NOTE: Each filename in these files must have a newline character sequence immediately following the last character of the filename. The newline character sequence is inserted by simply positioning the input cursor and pressing the <enter> key. Keywords : VwbIss kbfasttip Version : WINDOWS:1.0,1.5; WINDOWS NT:1.0,2.0,2.1,4.0,4.1,4.2,5.0 Platform : NT WINDOWS Issue type : kbinfo |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |