Static library debug symbols

前端 未结 5 378
Happy的楠姐
Happy的楠姐 2020-11-30 19:14

In VS2010 there is an option to generate debug info for exes/dlls under linker but no such option under librarian for libs. Is the debug info embedded in t

5条回答
  •  感情败类
    2020-11-30 19:33

    If you use /ZI or /Zi (C/C++ -> General -> Debug Information Format), then the vc$(PlatformToolsetVersion).pdb is created, which contains the debug info for all of the .obj files created. If alternately you use /Z7, the debug info will be embedded into the .obj file, and then embedded into the .lib. This is probably the easiest way to distribute the debug info for a static library.

    I wouldn't advise distributing a static library, however, since it's generally tied to a specific version of the compiler.

提交回复
热议问题