Suppress PDB generation from command line - C ++

I had a search and you can find some examples of using the Visual Studio menu to suppress the creation of PDB files. I need to do this for the project that I am creating, however, this requires using the Visual Studio compiler only from the command line. Is there a command line switch to disable PDB generation?

+2
visual-studio compiler-options
source share
1 answer

When you navigate through the project settings in Visual Studio, most of the options tell you that their equivalent command line key.

To disable connection time PDB generation, lower the /DEBUG switch.

To disable PDB generation during compilation, omit the /Z switch ( /Z{7|i|I} ).

[Edit] Oh, actually, if you use the /Z7 switch, debugging information is generated in the object file instead of the PDB. So this is one. However, compilation is done without it. Therefore, omit if you do not need debugging information.

+2
source share

All Articles