Reputation: 28178
Here's my setup:
A.exe -> B.lib -> tinyxmlstl.lib
A and B are in the same solution. B correctly finds tinyxmlstl.pdb, but A shows a linker warning about it. (LNK4099: PDB 'tinyxmlstl.pdb' was not found)
How can I make A find the pdb?*(without a build event that copies it around)
Upvotes: 1
Views: 978
Reputation: 28178
Debugging with Symbols has great indirect info on this matter. Adding the pdb path to the _NT_SYMBOL_PATH
environment variable fixes the issue although it's not as ideal as having the path embedded in the problematic project.
Edit:
Actually this solution only works when B is a DLL. When B is a static library...
Currently the VC Linker require the PDB file to be located at the exact location, and won't ever search any other locations.
However after doing some more reading it appears that this is essentially a VS bug that they aren't going to fix. Ugh. You get one of these warnings for each object file in the library, which means there can (and are) hundreds and it can't be suppressed.
Upvotes: 1