PDB found but it's the wrong one - Programmer

This is a discussion on PDB found but it's the wrong one - Programmer ; 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 ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: PDB found but it's the wrong one

  1. PDB found but it's the wrong one

    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.


  2. Re: PDB found but it's the wrong one


    "Norman Bullen" wrote in message
    news:zCywh.17430$pQ3.14902@newsread4.news.pas.eart hlink.net...
    > 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?


    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



  3. Re: PDB found but it's the wrong one


    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/]




+ Reply to Thread