Examples of #pragma hdrfile Directives

/************************************************************************
*

In the following example, the headers h1.h and h2.h are precompiled using the file fred.pch (provided /Si or /Fi are specified). If /Fidave.pch is specified alone, the compiler looks for the precompiled headers in fred.pch but will not generate new headers.

*
************************************************************************/


    #pragma hdrfile "fred.pch"
    #include "h1.h"
    #include "h2.h"
    main () {}


/************************************************************************
*

In the following example, only the header h1.h will be precompiled using the file fred.pch (provided /Si or /Fi are specified). If /Sidave.pch is specified alone, the compiler looks for the precompiled headers in fred.pch but will not generate new headers.

                                                                        *
************************************************************************/


    #pragma hdrfile "fred.pch"
    #include "h1.h"
    #pragma hdrstop
    #include "h2.h"
    main () {}