0

I have the following problem:

I need to build a static library (.lib) that can be provided with other source code in such a way that the project can be linked with it. However when I build the library in release mode, the build generates .pdb files and has full paths to them baked into the final .lib itself, making it unusable.

I don't necessarily care if it generates .pdb or not, but what setting should I change in the .vcxproj to make sure that the final release .lib doesn't require (or insert) absolute paths for those .pdbs?

Maxim
  • 335
  • 5
  • 14
  • *making it unusable* what do you mean? Full paths in it or not, a .lib can be linked again just fine without the .pdb as the latter is just for debugging – stijn Oct 04 '17 at 18:48
  • @stijn In the current build system a warning is treated as an error, so if someone on a different machine tries to link with that lib they'll get LNK4099 and that would stop the build. Also the path contains my username, project name etc, which I'm also not sure if it is OK to just distribute due to non-disclosure and some such – Maxim Oct 04 '17 at 19:53
  • 1
    Ah. Then you set the `Debug Information Format` to `None`. No pdb generated, no LNK40999. Is your question how to do this from the commandline (basically duplicate of e.g.https://stackoverflow.com/questions/15141429/how-to-set-preprocessordefinitions-as-a-task-propery-for-the-msbuild-task) or just which option it is (it's `DebugInformationFormat` in the `ClCompile` item definition)? – stijn Oct 05 '17 at 07:39

0 Answers0