Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

pch-dir

Tells the compiler the location for precompiled header files.

Syntax

Linux and macOS:

-pch-dir dir

Windows:

None

Arguments

dir

Is the path for precompiled header files. The path must exist.

Default

OFF

The compiler does not create or use precompiled headers unless you tell it to do so.

Description

This option tells the compiler the location for precompiled header files. It denotes where to find precompiled header files, and where new PCH files should be placed.

This option can be used with the -pch, -pch-create, and -pch-use options.

IDE Equivalent

Visual Studio: None

Eclipse: Precompiled Headers > Precompiled Headers' File Directory

Xcode: Precompiled Headers > Prefix Header

Alternate Options

None

Example

Consider the following command line:

icpc -pch -pch-dir /pch source32.cpp

It produces the following output:

"source32.cpp": creating precompiled header file /pch/source32.pchi

See Also