I am getting confused as to what is the difference between the compiler and linker PDB
files respectively (i.e. in Visual Studio, Project Properties > C/C++ > Output Files > Program Database File Name
vs Project Properties > Linker > Debugging
). I have tried to find the answer online and so far I know (may be wrong) that a PDB
file by the compiler is generated for obj
files while the PDB
file by the linker is generated for the binary (exe or dll) and is the one used for debugging.
If that is not true, please explain the difference. Either way, what to do when I am creating a DLL
where I have the option to select the output PDB
file for the compiler as well as the linker and what to do when I am creating a LIB file where only the compiler generates the PDB
files as there is no linking performed.
Background: The libraries/dlls are used by several projects, which then need the
PDB
files for debugging. In the case of alib
file, there is no ambiguity as there is only onePDB
file generated. But in the case of aDLL
however, do I need both thePDB
files to properly debug or just the one generated by the linker?