Disable C++ PDB generation from the IDE

怎甘沉沦 提交于 2019-12-18 13:12:02

问题


We need to surpress generation of debug symbols. The options availble under project properties/ configuration properties / c/c++ / general / debug information format, are equivalent to /Z7, /Zi and /ZI - I can't find a way to omit the /Zx flag entirely.

Unlike the situation here - we're building from the IDE.

I'm using visual studio 2010, and the project at hand is a static library.

EDIT: Here's the view from my installation of VS2012. Is this some installation issue?? Are your Debug-Information-Format options different?


回答1:


You can remove it manually:

Step 1. Compiler.

  • Selected "Configuration Properties > C/C++ > General > Debug Information Format"
  • Hit DEL

Step 2. Linker.

Also you need to disable generating Debug info for Linker

  • Selected "Configuration Properties > Linker > Debugging> Generate Debug Info" set to No

Step 3. Profiler.

  • Also set "Profile" to "No" in Linker > Advanced or you may still see PDB files generated!



回答2:


First thing first - this is not recommended to disable .PDB generation, even for a Release Build!

Anyway, you just need to go:

  • Linker -> Debugging -> Generate Debug Info, and set it to No


来源:https://stackoverflow.com/questions/14505322/disable-c-pdb-generation-from-the-ide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!