Link Debug Information
Linux*
Use option
g
at compile time to tell the compiler to generate symbolic debugging information in the object file.
Use option
gsplit-dwarf
to create a separate object file containing DWARF debug information. Because the DWARF object file is not used by the linker, this reduces the amount of debug information the linker must process and it results in a smaller executable file. See
gsplit-dwarf
for detailed information.
Windows*
Use option
Z7
at compile time or option
debug
at link time to tell the compiler to generate symbolic debugging information in the object file. Alternately, use option
Zi
at link time to generate executables with debug information in the
.pdb
file.