locked
Cannot find or open the PDB file RRS feed

  • Question

  • I have written a small Win32 program as 64bit. The program compiles, but the 'Output' display the above messages. It seems that the compiler cannot find some dlls and it also has some runtime errors. What do all theses messages mean and how can I fix them? Why is saying that it cannot find a System32 file, when I am compiling as 64bit?

    Any help will be much appreciated.

    'MyProgram.exe' (Win32): Loaded 'D:\Program Files\ArbolOne\MyProgram.exe'. Symbols loaded.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\lpk.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\usp10.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\msvcp120.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\msvcr120.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.
    First-chance exception at 0x000007FEFD0D940D in MyProgram.exe: Microsoft C++ exception: std::runtime_error at memory location 0x00000000002AF790.
    First-chance exception at 0x000007FEFD0D940D in MyProgram.exe: Microsoft C++ exception: std::runtime_error at memory location 0x00000000002AF270.
    First-chance exception at 0x000007FEFD0D940D in MyProgram.exe: Microsoft C++ exception: std::runtime_error at memory location 0x00000000002AF1E0.
    First-chance exception at 0x000007FEFD0D940D in MyProgram.exe: Microsoft C++ exception: std::runtime_error at memory location 0x00000000002AF190.
    First-chance exception at 0x000007FEFD0D940D in MyProgram.exe: Microsoft C++ exception: std::runtime_error at memory location 0x00000000002AF100.
    First-chance exception at 0x000007FEFD0D940D in MyProgram.exe: Microsoft C++ exception: std::runtime_error at memory location 0x00000000002AF700.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'. Cannot find or open the PDB file.
    'MyProgram.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file.
    The program '[30456] MyProgram.exe' has exited with code 0 (0x0).


    In the absence of clearly-defined goals, we become strangely loyal to performing daily trivia until ultimately we become enslaved by it.

    Wednesday, August 27, 2014 2:01 AM

Answers

  • "It seems that the compiler cannot find some dlls"

    The text says "cannot find PDB file", not "cannot find DLL file". PDB contain debugging information and those messages are displayed by the debugger, not by the compiler. You can safely ignore those message, the only ill side effect of not having the PDB files is that the debugger may not be able to display correct call stacks. Usually you can get PDB files for Windows dlls by selecting "Microsoft Symbol Servers" in Tools, Options, Debugging, Symbols.

    "and it also has some runtime errors"

    Presumably your code does something that causes exceptions to be thrown. Since the program doesn't stop that means that those exceptions are caught by a catch statement. You can try to enable "Break when an exception is thrown" for C++ exceptions in the Exceptions dialog from the Debug menu.

    "Why is saying that it cannot find a System32 file, when I am compiling as 64bit?"

    The 64 bit system dlls are in System32 for compatibility reasons. The 32 bit dlls are in SysWow64.

    • Proposed as answer by Marcel Raad Thursday, August 28, 2014 5:21 AM
    • Marked as answer by May Wang - MSFT Wednesday, September 3, 2014 2:15 AM
    Wednesday, August 27, 2014 3:15 AM