0

We have several compiler flags included during our build -

cl -c -MD -nologo -Od  /Zc:forScope /Zm800 -EHca  -Foemaildoc.obj ...

... followed by several other unrelated flags (mostly -IC). I'm trying to figure out why we're still building .pdb files? Our project is through VS2010, so is there a setting somewhere in the IDE that I need to turn off?

Edit 1:

Turns out this was an environment setting that was getting invoked.

MrDuk
  • 16,578
  • 18
  • 74
  • 133

1 Answers1

0

The reason why pdb files are generated is that you build your program with /ZI or /Zi (for C/C++). Check out here for more info.

To disable it, you can set it in VS:

  1. Compiler: Configuration Properties > C/C++ > General > Debug Information Format > make it empty

  2. Linker: Configuration Properties > Linker > Debugging> Generate Debug Info > set to No


Edit: However, as discussed here, you should only do this if you are sure you don't need them.

It might be better to keep the PDB files, and just copy over the files that you need.

Before changing the setting, please read this.

Sz.
  • 3,342
  • 1
  • 30
  • 43
herohuyongtao
  • 49,413
  • 29
  • 133
  • 174
  • Clearly, the line above has none of the switches you mention. – MrDuk Jan 21 '14 at 20:13
  • 1
    @ctote Please list all your compiler options. I'm pretty sure it will. – herohuyongtao Jan 21 '14 at 20:16
  • I removed my downvote - the option was there during our build script, but not during the manual build (which is where I pulled the flags). Sorry, the issue was eebkac here. – MrDuk Jan 21 '14 at 20:18