Supressing PDB generation from the command line - C++
Asked Answered
H

1

2

I've had a search around and can find a few examples of using Visual Studio menus to suppress creation of PDB files. I need to do this for a project I'm building, however, this requires using the Visual Studio compiler from the command line only. Is there a command line switch for disabling PDB generation?

Halsy answered 14/8, 2012 at 1:57 Comment(0)
D
2

When you navigate through project settings in Visual Studio, most options tell you what their equivalent command-line switch is.

To disable link-time PDB generation, omit the /DEBUG switch.

To disable compile-time PDB generation, omit the /Z switch (/Z{7|i|I}).

[Edit] Oh, in fact if you use the /Z7 switch, the debug information is generated into the object file instead of a PDB. So that particular one is okay. Compilation is faster without it, however. So omit if you don't want any debug information.

Diminished answered 14/8, 2012 at 2:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.