usepcomp

Option Type Default Value #pragma options C C++
-qoption nousepcomp - x  

Syntax

    -qusepcomp | -qusepcomp=directory | -qnousepcomp 

Purpose
Uses a precompiled header file if no included files that have not changed since the precompiled header was created. This may help improve compile time.

Notes
Usage modes for usepcomp are:

-qusepcomp Uses the precompiled header file called csetc.pch, if it exists in the current directory.
-qusepcomp=directory Uses a precompiled header file if:
  • directory is the name of an existing directory, and the csetc.pch precompiled header file exists in that directory.
  • a directory with the name directory does not exist, but a precompiled header file called directory exists in the current directory.
-qnousepcomp Does not use precompiled header files.

The -qusepcomp and -qgenpcomp options are designed to be used together, but they may be used separately.

When -qusepcomp and -qgenpcomp are used together, the compiler will automatically maintain and use a current precompiled header.

If you update your system header files, you can regenerate them with the /usr/vacpp/bin/mkpcomp command.

Precompiled headers will only be used at the same language level used during their creation.

For a given #include, -qusepcomp is checked first. Then the compiler checks for a precompiled version of the file to be included if such is specified. If it is found and it is current, it is used.

If a precompiled header is not being used (for example, if a current one is not found, or if -qusepcomp is not specified), and -qgenpcomp is specified, the compiler will create a new precompiled header (even if it exists and is current).

The precompiled headers created by installing IBM VisualAge C++ are listed in the LPP inventory, and are removed if you uninstall IBM VisualAge C++. Any additional headers you create are not removed during uninstall.



Precompiled C Headers


List of Batch Compiler Options and Their Defaults
Equivalent Batch Compile-Link and Incremental Build Options