Tech Support > Microsoft Windows > Development Resources > PDB found but it's the wrong one
PDB found but it's the wrong one
Posted by Norman Bullen on February 2nd, 2007


I'm still using VC 6.0 to maintain a project that I've been working on
for about the last three years. Today it started doing something that
I've never seen before and don't understand.

I rebuilt the debug version after making a minor change and when I tried
to run it in the debugger it popped up a dialog captioned "Find
Symbols". Initially, the dialog shows a tree representation of a
directory path (it seems to be the directory of whatever file is active
in the editor) and asks me to find the Program Data Base. When I
navigate the tree to the directory containing my newly created .EXE and
..PDB files, it says "A file with the correct name was found in this
directory, but it is not the correct one."

I've tried doing a full rebuild, deleting both the .EXE and .PDB files
and doing another rebuild, but nothing has helped so far.

The .EXE and the .PDB files always have exactly the same timestamp so
I'm sure they are being created at the same time by the linker.

The change that precipitated this situation was: I decided that one
module in the program was sufficiently useful that I would add it to my
personal library. I deleted the .C file and the .H file from the project
and removed the two files from the project directory, and compiled the
..C file into a static library. (That library was already being linked
because it contains other modules that are used by the project.)

Any thoughts on what happened or, better yet, how to fix it?

Norm
--
--
To reply, change domain to an adult feline.

Posted by Sten Westerback \(MVP SDK\) on February 2nd, 2007



"Norman Bullen" <norm@BlackKittenAssociates.com.INVALID> wrote in message
news:zCywh.17430$pQ3.14902@newsread4.news.pas.eart hlink.net...
I remember that i got that error ones too but can't remember exactly how i
got it fixed. But even a rebuild often leaves files in the temporary build
folder. Try clearing project and then delete the folder.

- Sten



Posted by Oleg Starodumov on February 2nd, 2007



Replace /pdbtype:sept linker option by /pdbtype:con,
watch the output for possible linker warnings.

Also ensure that the static library is built with debug information
(/Z7 compiler option would be best in this case, IMO,
though it is also possible to use /Zi and /FdYourlib.pdb)

--
Oleg
[VC++ MVP http://www.debuginfo.com/]




Similar Posts