Developer Guide and Reference

Contents

Zi, Z7
, ZI

Tells the compiler to generate full debugging information in either an object (.obj) file or a project database (PDB) file.

Syntax

Linux:
See option g.
macOS:
See option g.
Windows:
/Zi
/Z7
/ZI
Arguments
None
Default
OFF
No debugging information is produced.
Description
Option
/Z7
tells the compiler to generate symbolic debugging information in the object (.obj) file for use with the debugger. No .pdb file is produced by the compiler.
Option
/ZI
is a synonym for option
/Zi
.
The
/Zi
option tells the compiler to generate symbolic debugging information in a program database (PDB) file for use with the debugger. Type information is placed in the .pdb file, and not in the .obj file, resulting in smaller object files in comparison to option
/Z7
.
When option
/Zi
is specified, two PDB files are created:
  • The compiler creates the program database project.pdb. If you compile a file without a project, the compiler creates a database named vc
    x
    0.pdb, where
    x
    represents the major version of Visual C++, for example vc140.pdb.
    This file stores all debugging information for the individual object files and resides in the same directory as the project makefile. If you want to change this name, use option
    /Fd
    .
  • The linker creates the program database executablename.pdb.
    This file stores all debug information for the .exe file and resides in the debug subdirectory. It contains full debug information, including function prototypes, not just the type information found in vc
    x
    0.pdb.
Both PDB files allow incremental updates. The linker also embeds the path to the .pdb file in the .exe or .dll file that it creates.
The compiler does not support the generation of debugging information in assemblable files. If you specify these options, the resulting object file will contain debugging information, but the assemblable file will not.
These options turn off option
/O2
and make option
/Od
the default unless option
/O2
(or higher) is explicitly specified in the same command line.
For more information about the
/Z7
,
/Zi
, and
/ZI
options, see the Microsoft documentation.
Alternate Options
Linux: -g
Windows: None

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804