0

I link to a static library (3rd party) and get a LNK4099 warning: .Pdb not found

Is there any way to create a stripped pdb for this library? I do not require debug info from this specific library, just no warnings.

Till now i came across LNK4209: corrupted pdb warning same as LNK4099 unignorable. Editing link.exe and adding /ignore: is a good, but local solution, not suitable for server build machine.

Florea Marian
  • 39
  • 1
  • 5
  • Adding '#pragma warning( disable : 4099 )' to the first file linking against the library isn't a suitable solution? – eladidan Feb 18 '13 at 19:14
  • Might be a duplicate for [visual-c-how-to-disable-specific-linker-warnings](http://stackoverflow.com/questions/661606/visual-c-how-to-disable-specific-linker-warnings) – Grigorii Chudnov Feb 18 '13 at 19:18
  • #pragma warning does not function for this specific warning, that is clear, the question is how to create a stripped pdb for this library – Florea Marian Feb 18 '13 at 19:24
  • @Grigoriy as I've said on my computer I managed to remove this nuissance, I've mentioned it in the part with editing and ignore – Florea Marian Feb 18 '13 at 19:27
  • @Florea Marian I don't think there is a way to do it. If you have an access to the source code, build it with symbols. If the source is not available, the only way to get PDB is contact manufacturer. – Grigorii Chudnov Feb 18 '13 at 19:57

1 Answers1

2

On CodePlex there is a project named 'Common Compiler Infrastructure' which hosts classes to interact with PE and PDB formats. One of the classes is called PdbWriter which can be used to generate a pdb file. Generating an empty pdb file and using that as a substitution of the original pdb file is likely a solution that could work given your criteria.

Lawrence Kok
  • 1,568
  • 11
  • 29