### #pragma hdrfile

The #pragma hdrfile directive specifies the filename of the precompiled header to be generated and/or used.

    >>--#--pragma--hdrfile--"file_name"--><

It must appear before the first #include directive and either the / Fi option or the /Si option is specified. The /Si and /Fi options allow more than one precompiled header to be use for a single application.

If a file name is specified both on the command line and on #pragma hdrfile, the name specified on the pragma takes precedence. If the name specified is a directory, then the the compiler searches for or generates a file with the default name in that directory.

In order to maximize the reuse of precompiled headers, the use #pragma hdrfile in combination with #pragma hdrstop to manually limit the initial sequence of #include directives.

Use precompiled header files to decrease compile time. Using precompiled headers will not improve compile time performance in most applications without some organization of the headers included by each source file.

Examples of #pragma hdrfile Directives