/Si Compiler Option

Syntax: Default:
/Si[+|-] /Si-
/Si[dir][name]  

Use /Si to use precompiled header files, if they exist and are current.

If you specify name or dir with the option, then the compiler looks for a precompiled header file with that name and in that directory.

You can also use the #pragma hdrfile directive to tell the compiler what file to look for. You must still specify /Si.

If you do not specify a name or directory, the compiler looks for a file named csetc.pch (if the next source file is a C file) or csetcpp.pch (if the next source file is a C++ file), in the current working directory.

Use the /Fi compiler option to create or update the precompiled header files. Use /Si and /Fi in combination to ensure that your precompiled header files are always up to date.

If only /Fi is used, the compiler creates a precompiled header file. If both /Fi and /Si are used, and a precompiled header file already exists, the compiler uses it. If no precompiled header file, exists or if the existing one is out-of-date, a new one will be created.

Note: The file you generate (/Fi) must be the same file you use (/Si). If you specify different filenames or directories with the two options, the name or directory specified last is used with both options. If you specify a filename or directory with #pragma hdrfile, it overrides the name or directory specified with the options.

By default, the compiler does not use precompiled header files.



Precompiled Headers


Summary of Compiler Options