Re: How to debug a .LIB that is linked to an EXE?
- From: "Oleg Starodumov" <com-dot-debuginfo-at-oleg>
- Date: Fri, 24 Mar 2006 04:09:36 -0800
In addition to what Gary and David have already said, it might be important
to know how to produce debug information for the .lib file. You can use
either /Z7 compiler option, or /Zi together with /Fd (they can be set up also
in the IDE).
If you compile the library with /Z7, debug information gets embedded into
the .lib file, and thus cannot be lost if you e.g. distribute the library to others,
or save it in a source control system.
If you compile with /Zi, debug information will be stored in a separate file
(vcxx.pdb by default, where "xx" is the version number of VS), and you
have to store/copy this file with the library to make sure that it is not lost.
Usually it also makes sense to use /Fd option to change the default name of
the .pdb file to something that contains the name of the library.
By default, debug builds of library projects use yet another option,
/ZI, which is the same as /Zi but also puts Edit&Continue information
into the resulting .pdb file.
Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]
.
- Prev by Date: Re: How to debug a .LIB that is linked to an EXE?
- Next by Date: Reading Running Process
- Previous by thread: Re: How to debug a .LIB that is linked to an EXE?
- Next by thread: Reading Running Process
- Index(es):
Relevant Pages
|