3.28 Manually specifying the filename and location of a Precompiled Header (PCH) file

You can manually specify the filename and location of PCH files for the compiler to create and use.

To manually specify the filename and location of a PCH file, use any of the following compiler command-line options:
  • --create_pch=filename
  • --pch_dir=directory
  • --use_pch=filename
If you use --create_pch or --use_pch with the --pch_dir option, the indicated filename is appended to the directory name, unless the filename is an absolute path name.


If multiple options are specified on the same command line, the following rules apply:
  • --use_pch takes precedence over --pch.
  • --create_pch takes precedence over all other PCH file options.
Related concepts
3.22 Precompiled Header (PCH) files
3.23 Automatic Precompiled Header (PCH) file processing
3.24 Precompiled Header (PCH) file processing and the header stop point
3.25 Precompiled Header (PCH) file creation requirements
3.26 Compilation with multiple Precompiled Header (PCH) files
3.27 Obsolete Precompiled Header (PCH) files
3.29 Selectively applying Precompiled Header (PCH) file processing
3.30 Suppressing Precompiled Header (PCH) file processing
3.31 Message output during Precompiled Header (PCH) processing
3.32 Performance issues with Precompiled Header (PCH) files
Related reference
7.28 --create_pch=filename
7.120 --pch
7.121 --pch_dir=dir
7.155 --use_pch=filename
Non-ConfidentialPDF file icon PDF versionARM DUI0375E
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.