1

I've googled and investigated this problem for a while now but no success. I'm currently working in a visual studio 2010 C++ solution with the resulting executable running on windows. The solution has multiple configurations where some of the code and libs are config-specific but the general framework is shared between all configs.

The problem I'm having is that for a certain config part of the call stack the symbols doesn't show up! The missing symbols are on a specific static lib and seems to be consistent for all references to that lib. Also the lib is shared between the configs and it symbols are presented correctly in other configs.

So I would like to find out what might be the cause of this. If anybody has experienced this in the past?

If I click "Symbol Load Information" I get the same result in both the working and faulty configs, the path to the pdb for the executable. So for some reason it seems like the symbols for this particular lib doesn't get included in the pdb. The individual pdb for the lib is generated however. The bsc and sbr files are generated even though a lot of the sbr files are empty.

So I would be happy if someone knew how to fix this or have ideas of things I should try or look out for?

Thanks a lot!

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575

1 Answers1

0

The PDB for the static library must be available and in the same directory as the static library itself at the moment you link the executable. Otherwise, its debugging information will not be incorporated into the executable's PDB. (It's not possible to use a static library PDB directly during a debugging session.)

If you want to make things more dependable, make sure that you have the static library set up as an inter-project reference, rather than having it as a "project dependency". You should not manually put the library name in the linker inputs for the executable.

Sneftel
  • 40,271
  • 12
  • 71
  • 104
  • Thanks Sneftel. Unfortunately it didn't help in my case :( I changed so that all pdbs for the static libs were located next to their libs. I also tried to use references instead of dependencies. The strange thing is that other libs displays symbols correctly no matter where their pdbs are located or whether they are using dependencies or references. Is there some setting that's different for this particular lib? I can't find which one it could be. – user3619622 May 09 '14 at 16:08