VS2008: Fixing the Warning PDB ‘vc90.pdb’ not found

by

Using separate build libraries lead to the following message of the Visual Studio 2008 linker:

warning LNK4099: PDB 'vc90.pdb' was not found with ...

The problem is that the object files embeds the path to the PDB file. The following steps extracts the object file from the library and shows the embedded path.

C:\>lib /list al.lib
Microsoft (R) Library Manager Version 9.00.30729.01
...
.\Debug\alIP_Winsock.obj
...

C:\>lib /extract:.\Debug\alIP_Winsock.obj al.lib
Microsoft (R) Library Manager Version 9.00.30729.01

C:\>dir *.obj
...
30.06.2009  13:53            48.195 alIP_Winsock.obj
...

C:\>dumpbin /section:.debug$T /rawdata  alIP_Winsock.obj
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
...
Dump of file alIP_Winsock.obj
...
RAW DATA #3E
00000000: 04 00 00 00 6E 00 15 15 D1 E3 36 F9 6E D3 E4 4E  ....n...Ñã6ùnÓäN
00000010: 92 D2 08 70 C2 43 72 F6 01 00 00 00 63 3A 5C 5F  .Ò.pÂCrö....c:\_
...
00000030: 6F 61 5C 63 6F 64 65 5C 64 70 77 73 63 6F 72 65  oa\code\dpwscore
00000040: 2D 32 2E 31 2E 30 5C 70 6C 61 74 66 6F 72 6D 5C  -2.1.0\platform\
00000050: 76 73 32 30 30 38 5C 77 69 6E 33 32 5C 61 6C 5C  vs2008\win32\al\
00000060: 61 6C 5C 64 65 62 75 67 5C 76 63 39 30 2E 70 64  al\debug\vc90.pd
00000070: 62 00 F2 F1                                      b.òñ
...

Fixing this problem is done by setting the Program Database File for the object file and the library to the same setting.

Here are the location in the VS2008 Project Properties:

Project Configuration Properties -> C/C++ -> Output Files
Program Database File

This name, e.g. $(IntDir)\vc90.pdb, is embedded into the object file and it should be the same as the one in

Project Configuration Properties -> Linker -> Debugging
Generate Program Database File

This is, e.g. $(TargetDir)$(TargetName).pdb

Now the object file contain the path where the library is located, too.

...
RAW DATA #3E
00000000: 04 00 00 00 56 00 15 15 3E 7B 32 F1 12 86 51 48  ....V...>{2ñ..QH
00000010: 97 34 6B AC 14 85 20 C2 01 00 00 00 63 3A 5C 5F  .4k¬.. Â....c:\_
...
00000030: 6F 61 5C 63 6F 64 65 5C 74 6F 6F 6C 73 5C 64 70  oa\code\tools\dp
00000040: 77 73 63 6F 72 65 62 75 69 6C 64 5C 64 65 62 75  wscorebuild\debu
00000050: 67 5C 61 6C 2E 70 64 62 00 F3 F2 F1              g\al.pdb.óòñ
...

Here are the Properties as used within a VS C++ Project file (.vcproj) or Property file (.vsprops):

<Tool
Name=”VCCLCompilerTool”
ProgramDataBaseFileName=”$(TargetDir)$(TargetName).pdb”
/>
<Tool
Name=”VCLinkerTool”
ProgramDatabaseFile=”$(TargetDir)$(TargetName).pdb”
/>

<br />  <Tool<br />    Name="VCCLCompilerTool"<br />    ProgramDataBaseFileName="$(TargetDir)$(TargetName).pdb"<br />  /><br />  <Tool<br />    Name="VCLinkerTool"<br />    ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"<br />  /><br />
About these ads

Tags:

18 Responses to “VS2008: Fixing the Warning PDB ‘vc90.pdb’ not found”

  1. Daniel Dekkers Says:

    Should i change $(IntDir)\vc90.pdb into $(TargetDir)$(TargetName).pdb or the other way around?

  2. kalucard Says:

    Hello,
    I came across the same warning. I don’t really understand how you fix it.

    “Fixing this problem is done by setting the Program Database File for the object file and the library to the same setting.” : Does it mean that I have to replace “$(IntDir)\vc90.pdb” by “$(TargetDir)$(TargetName).pdb” in “Project Configuration Properties -> C/C++ -> Output Files Program Database File” ?

    Thanks for your post and for taking your time to post a fix to this issue.

  3. Mik Says:

    Hello,
    Even though I change the “$(IntDir)\vc90.pdb” by “$(TargetDir)$(TargetName).pdb”, error isn’t solved. I tried on Release and Debug types of debuggers. So, is there other way?

    Thanks in advance!

  4. cal Says:

    Hi

    thanks for this post! It helped me fixing this problem :)))

    Regards,
    cal

  5. Jason Geng Says:

    Thanks. That solved my problem too.

  6. Harry Says:

    First try this before anything else… delete the contents of debug directory (which includes all the objs and the pdb) and then build again. That solved my problem.

  7. Damir Says:

    Thanks! It helped. After renaming it and including target pdb with debug version of the lib to my project I now resolved this annoying warning.

  8. Abubakar Roko Says:

    Iam using VS2005 and having this “”warning LNK4099: PDB ‘vc90.pdb’ was not found with ‘C:\Program Files\Lemur\Lemur 4.12\lib\lemur.lib” warning.

    I did all what you said, but i stiil have the warning

  9. MayBee Says:

    Anybody knows how to solve this problem in VS2010?

    • Christian Says:

      I am using VS10 (2010) the same way as VS9 (2008). So I would think that there is no difference to VS9 in VS10. Are you observing a difference?

      • MayBee Says:

        I do not know where to find the menu entries
        Project Configuration Properties -> C/C++ -> Output Files
        Program Database File
        or
        Project Configuration Properties -> Linker -> Debugging
        Generate Program Database File
        in the configuration properties.
        Also manually editing the project files by adding something like the tags above does not bring the intended results as projects converted to vs10 (vcxproj files) seems to have another notation for such behaviour.

  10. Dion Says:

    (You’re the #1 link from Google for ‘vc90.pdb missing’.)
    I made this error go away by setting “Whole Program Optimization” to “No Whole Program Optimization” in the library I produce. Without that change, clients get the ‘vc90.pdb missing’ warning when they try to link it in.

  11. Bud Says:

    I have tried all of the suggestions here – using VS10 and still the warnings remain:

    Warning 144 warning LNK4099: PDB ‘wtdbosqlite3d.pdb’ was not found with ‘wtdbosqlite3d.lib(sqlite3.obj)’ or at ‘C:\Users\Jser\documents\visual studio 2010\Projects\st\Debug\wtdbosqlite3d.pdb'; linking object as if no debug info C:\Users\User\Documents\Visual Studio 2010\Projects\app\wtdbosqlite3d.lib(sqlite3.obj)

    I deleted all files from these two directories,

    I set the project properties such that “Output Files” matches that at Linker >> Debuggin >> Generate Program Database File, which is $(TargetDir)$(TargetName).pdb

    I checked “Whole Program Optimization” set to “No” (it was).

    Cleaned and rebuilt the project, still get these warnings for my debug project.

    What could be the problem?

    • Christian Says:

      Is the filename embedded into the .obj file korrekt? Have you verified it with the dumpbin utility?

      • Bud Says:

        I have used dumpbin to find the filename in the project directory:

        c:\users\uname\documents\visual studio 2010\projects\st\debug\stapp.pdb

        That filename is the same found in the directory; however, the project name is different case: Stapp (not stapp). And the other issue is that the warning is not referring to this file; rather, to a dependency file ‘wtdbosqlite3d.pdb’

        If I do a search for this file it is found here: C:\witty\wt-3.3.0\build\src\Wt\Dbo\backend\Debug . If I navigate to this directory I don’t find any *.obj files, only one other file: ‘wtdbosqlite3d.lib’.

        A search for wtdbosqlite3d.* reveals no *.obj files: only two other files on the system match that search, anther copy of the .lib file, and one .dll file, both within the install directory C:\Program Files (x86)\WT\lib and C:\Program Files (x86)\WT\bin, respectively.

        I should point out that this warning is a recent development. I’ve been running this program on this machine for days without these warnings.

      • Christian Says:

        When you do not have the missing .pdb and you can not create it, you will have to ignore this warning.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: