Cannot find or open the PDB file问题的解决

最近发现用VS2010编译的时候输出窗口总是有如下的类似信息:
  1. 'win32.exe': Loaded 'D:\程序设计\vs2010\win32\Debug\win32.exe', Symbols loaded.
  2. 'win32.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
  3. 'win32.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
  4. 'win32.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
  5. 'win32.exe': Loaded 'C:\Windows\System32\user32.dll', Cannot find or open the PDB file
  6. 'win32.exe': Loaded 'C:\Windows\System32\gdi32.dll', Cannot find or open the PDB file
  7. 'win32.exe': Loaded 'C:\Windows\System32\lpk.dll', Cannot find or open the PDB file
  8. 'win32.exe': Loaded 'C:\Windows\System32\usp10.dll', Cannot find or open the PDB file
  9. 'win32.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file
  10. 'win32.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
  11. 'win32.exe': Loaded 'C:\Windows\System32\imm32.dll', Cannot find or open the PDB file
  12. 'win32.exe': Loaded 'C:\Windows\System32\msctf.dll', Cannot find or open the PDB file
  13. 'win32.exe': Loaded 'C:\Windows\System32\uxtheme.dll', Cannot find or open the PDB file
  14. 'win32.exe': Loaded 'C:\Windows\System32\dwmapi.dll', Cannot find or open the PDB file
  15. 'win32.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
  16. 'win32.exe': Loaded 'C:\Windows\System32\sechost.dll', Cannot find or open the PDB file
  17. 'win32.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Cannot find or open the PDB file
  18. 'win32.exe': Loaded 'C:\Windows\System32\ole32.dll', Cannot find or open the PDB file
  19. 'win32.exe': Loaded 'C:\Windows\System32\cryptbase.dll', Cannot find or open the PDB file
  20. 'win32.exe': Loaded 'C:\Windows\System32\clbcatq.dll', Cannot find or open the PDB file
  21. 'win32.exe': Loaded 'C:\Windows\System32\oleaut32.dll', Cannot find or open the PDB file
  22. The program '[1700] win32.exe: Native' has exited with code 0 (0x0).

     网上搜了半天找到解决的办法:

打开VS2010:工具--》选项--》》调试--》符号
接下来就是选择Microsoft,然后确认

 接着随便编译一个程序,过程会灰常的慢。

  看到此目录下符号缓存了吗?C:\Users\kjqin\AppData\Local\Temp\SymbolCache 找到这个目录拷贝出来,找个地方存放。接下来就是去掉Microsoft符号服务器,要是不去,每次都要从Microsoft下载很麻烦,已经缓存了,我们就可以利用好这些缓存,至此完美解决。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
"Cannot find or open the PDB file"是指Microsoft Visual C++ 2010在调试时无法找到或打开PDB文件。PDB文件是程序数据库文件,包含了用于调试的符号信息和调试时需要的其他相关信息。当使用Visual C++编译器编译项目时,会自动生成PDB文件。 有几种可能的原因导致无法找到或打开PDB文件。一种可能是PDB文件没有正确生成或被删除。这可能是由于编译器选项没有正确设置,例如/Fd选项未指定PDB文件的名称和位置。另一种可能是PDB文件存在,但由于路径错误或访问权限问题而无法找到或打开。这可能是由于项目设置中的一些配置错误导致的。 如果在调试中遇到"Cannot find or open the PDB file"错误,可以尝试以下解决方法: 1. 确保项目的编译器选项中的/Fd选项正确设置为生成PDB文件的名称和路径。 2. 检查PDB文件的路径是否正确,确保PDB文件存在于指定的位置。 3. 检查项目的配置设置,确保没有错误或冲突的配置。 4. 如果PDB文件存在于不同的路径或项目中,可以尝试手动设置调试器的符号搜索路径,以便能够找到PDB文件。 5. 如果问题仍然存在,可能需要重新生成整个项目,以确保正确生成PDB文件。 总之,"Cannot find or open the PDB file"错误表示Microsoft Visual C++ 2010在调试时无法找到或打开PDB文件。这可能是由于编译器选项或项目配置的问题导致的。通过检查和调整相关的设置,可以解决这个问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [vs2010 c++ 在Debug时总是提示Cannot find or open the PDB file](https://blog.csdn.net/xtx1990/article/details/35987123)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [解决Cannot find or open the PDB file问题](https://blog.csdn.net/weixin_30617695/article/details/95234603)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值