Show: Delphi C++
Display Preferences

#pragma hdrstop

From RAD Studio
Jump to: navigation, search

Go Up to Pragma Directives Overview Index

Syntax (See Pseudo-grammar)

#pragma hdrstop

Description

This directive terminates the list of header files eligible for precompilation. You can use it to reduce the amount of disk space used by precompiled headers.

Precompiled header files can be shared between the source files of your project only if the #include directives before #pragma hdrstop are identical. Therefore, you get the best compiler performance if you include common header files of your project before the #pragma hdrstop, and specific ones after it. Make sure the #include directives before the #pragma hdrstop are identical in all the source files, or that there are only very few variations.

The integrated development environment generates code to enhance precompiled header performance. For example, after a New Application, source file "Unit1.cpp" will look like this (comments added):

#include <vcl.h>       // common header file
#pragma hdrstop      // terminate list here

Use this pragma directive only in source files. The pragma has no effect when it is used in a header file.

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance