PDB files with Libraries in Visual Studio 10

前端 未结 1 1470
隐瞒了意图╮
隐瞒了意图╮ 2021-02-04 08:04

When building a static library (.LIB) in MS Visual Studio 10 with debug information, the .PDB is always named vc100.pdb.
(as oppose

相关标签:
1条回答
  • 2021-02-04 08:12

    If you use /Z7 (instead of /ZI or /Zi) [ in the UI C/C++ -> General -> Debug Information Format] then the debug information is embedded in the lib file itself, instead of a separate pdb, which means you don't need to worry about the same name.

    When you build your final executable (.exe or .dll) then you'll get a merged pdb from all the little embedded pdbs.

    see this question for more info

    Its the way I've always managed this issue on my team, as you can't lose the debug information during the build process. It bloats the libs somewhat [but no more in total than having both lib and pdb], but as you probably don't ship libs you shouldn't worry to much about this.

    0 讨论(0)
提交回复
热议问题