Search code examples
c++debuggingvisual-studio-2012static-librariesvisual-studio-debugging

Visual Studio 2012 Update 4 doesn't create PDBs for static libraries


After I installed the 4th update on Visual Studio 2012 I noticed that there is no PDB file next to my C++ static library any more. I can debug the library on my local PC (apparently some information about sorce code location is inside lib file), but when I copy this static library to another PC, VS doen't try to locate source files. I tried to add source code location to "Solution Property -> Common Properties -> Debug Source Files -> Directories containing source code", but it doesn't help anyway.

Did anyone solve the problem?


Solution

  • Ok, I fixed that.

    Actually the pdb file didn't disappear, it just placed in the intemediate directory and had a strange name - vc110.pdb, which made me think that it contains debug information only about standard VC files. Apparently, it contains information about my library as well. Renaming to MyLib.pdb will not work because MyLib.lib file contains reference to the old name. So its name may be changed only via C/C++ -> Output Files -> Program Database File Name.