cannot find or open PDB file 如何破?

second_lc 2013-11-11 11:07:32

如上图所示提示错误,控制台输出如下:
“testUA.exe”: 已加载“E:\C++workplace\lccl02\resip\resip\recon\test\Win32\Debug\testUA.exe”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\ntdll.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\kernel32.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\KernelBase.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\ws2_32.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\msvcrt.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\rpcrt4.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\nsi.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\libeay32.dll”,已加载符号。
“testUA.exe”: 已加载“C:\Windows\System32\gdi32.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\user32.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\lpk.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\usp10.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\advapi32.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\sechost.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\msvcr100.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\ssleay32.dll”,已加载符号。
“testUA.exe”: 已加载“C:\Windows\System32\msvcp100d.dll”,已加载符号。
“testUA.exe”: 已加载“C:\Windows\System32\msvcr100d.dll”,已加载符号。
“testUA.exe”: 已加载“C:\Windows\System32\winmm.dll”,Cannot find or open the PDB file
“testUA.exe”: 已加载“C:\Windows\System32\imm32.dll”,Cannot find or open the PDB file
程序“[4560] testUA.exe: 本机”已退出,返回值为 0 (0x0)。
网上修改 调试->符号 不好使。
Ctrl+F5可以,但是,我需要的是可以调试的,可以加断点的。(加断点的方法也不好使)
希望能得到一个好使的办法。
除此之外,我的项目只能通过SSL-Debug调试,Debug报错,可让我也很头疼。
求帮忙....
...全文
1029 18 打赏 收藏 转发到动态 举报
写回复
用AI写文章
18 条回复
切换为时间正序
请发表友善的回复…
发表回复
EverlightGe 2015-01-09
  • 打赏
  • 举报
回复
层主,我现在也遇到了这个问题,请问你是怎么解决的啊?
second_lc 2013-11-15
  • 打赏
  • 举报
回复
问题没解决!!
图灵狗 2013-11-11
  • 打赏
  • 举报
回复
配置为调试模式,然后Rebuild All
引用 楼主 second_lc 的回复:
如上图所示提示错误,控制台输出如下: “testUA.exe”: 已加载“E:\C++workplace\lccl02\resip\resip\recon\test\Win32\Debug\testUA.exe”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\ntdll.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\kernel32.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\KernelBase.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\ws2_32.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\msvcrt.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\rpcrt4.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\nsi.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\libeay32.dll”,已加载符号。 “testUA.exe”: 已加载“C:\Windows\System32\gdi32.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\user32.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\lpk.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\usp10.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\advapi32.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\sechost.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\msvcr100.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\ssleay32.dll”,已加载符号。 “testUA.exe”: 已加载“C:\Windows\System32\msvcp100d.dll”,已加载符号。 “testUA.exe”: 已加载“C:\Windows\System32\msvcr100d.dll”,已加载符号。 “testUA.exe”: 已加载“C:\Windows\System32\winmm.dll”,Cannot find or open the PDB file “testUA.exe”: 已加载“C:\Windows\System32\imm32.dll”,Cannot find or open the PDB file 程序“[4560] testUA.exe: 本机”已退出,返回值为 0 (0x0)。 网上修改 调试->符号 不好使。 Ctrl+F5可以,但是,我需要的是可以调试的,可以加断点的。(加断点的方法也不好使) 希望能得到一个好使的办法。 除此之外,我的项目只能通过SSL-Debug调试,Debug报错,可让我也很头疼。 求帮忙....
sduxiaoxiang 2013-11-11
  • 打赏
  • 举报
回复
开调试 编译就是了
second_lc 2013-11-11
  • 打赏
  • 举报
回复
还是不行,现在弄得SSL-Debug都调试不了了,直接报什么常量错误。
ZongShengLee 2013-11-11
  • 打赏
  • 举报
回复
调试目录有没有读写权限? 换Zi试试。
second_lc 2013-11-11
  • 打赏
  • 举报
回复
引用 13 楼 ZongShengLee 的回复:
引用 12 楼 second_lc 的回复:
[quote=引用 11 楼 ZongShengLee 的回复:] [quote=引用 10 楼 second_lc 的回复:] [quote=引用 7 楼 ZongShengLee 的回复:] 调试路径对没?
不知你说的是哪个项目的调试路径,是启动项的吗?怎么样才算正确呢?
project -> property ->debugging ->working directory 这个目录里边有没有启动exe对应的pdb?[/quote] 有exe和pdb[/quote] Debug information format 选的哪个? [/quote] 用于“编辑并继续”的程序数据库 (/ZI)
ZongShengLee 2013-11-11
  • 打赏
  • 举报
回复
引用 12 楼 second_lc 的回复:
引用 11 楼 ZongShengLee 的回复:
[quote=引用 10 楼 second_lc 的回复:] [quote=引用 7 楼 ZongShengLee 的回复:] 调试路径对没?
不知你说的是哪个项目的调试路径,是启动项的吗?怎么样才算正确呢?
project -> property ->debugging ->working directory 这个目录里边有没有启动exe对应的pdb?[/quote] 有exe和pdb[/quote] Debug information format 选的哪个?
second_lc 2013-11-11
  • 打赏
  • 举报
回复
引用 11 楼 ZongShengLee 的回复:
引用 10 楼 second_lc 的回复:
[quote=引用 7 楼 ZongShengLee 的回复:] 调试路径对没?
不知你说的是哪个项目的调试路径,是启动项的吗?怎么样才算正确呢?
project -> property ->debugging ->working directory 这个目录里边有没有启动exe对应的pdb?[/quote] 有exe和pdb
ZongShengLee 2013-11-11
  • 打赏
  • 举报
回复
引用 10 楼 second_lc 的回复:
引用 7 楼 ZongShengLee 的回复:
调试路径对没?
不知你说的是哪个项目的调试路径,是启动项的吗?怎么样才算正确呢?
project -> property ->debugging ->working directory 这个目录里边有没有启动exe对应的pdb?
second_lc 2013-11-11
  • 打赏
  • 举报
回复
引用 7 楼 ZongShengLee 的回复:
调试路径对没?
不知你说的是哪个项目的调试路径,是启动项的吗?怎么样才算正确呢?
second_lc 2013-11-11
  • 打赏
  • 举报
回复
我觉得在SSL-Debug的时候编译没有错误,在Debug的时候有错误说明这两个肯定是有什么不一样比如运行时给的参数。而且,在Security.cxx中有这样一句:#ifdef USE_SSL。还有,为什么要表示错误如图:
second_lc 2013-11-11
  • 打赏
  • 举报
回复
还是不可以....
ZongShengLee 2013-11-11
  • 打赏
  • 举报
回复
调试路径对没?
图灵狗 2013-11-11
  • 打赏
  • 举报
回复
你这样只是添加了库的搜索目录而已,并没有实际链接LIB,当然会找不到符号,试试在代码中添加: #pagram comment(lib, "xxx.lib"); #pagram comment(lib, "yyy.lib"); #pagram comment(lib, "zzz.lib"); ...
引用 5 楼 second_lc 的回复:
比如说如下错误: recon.lib(UserAgent.obj) : error LNK2019: 无法解析的外部符号 "public: __thiscall resip::Security::Security(class resip::Data const &,class resip::BaseSecurity::CipherList const &)" (??0Security@resip@@QAE@ABVData@1@ABVCipherList@BaseSecurity@1@@Z),该符号在函数 "public: __thiscall recon::UserAgent::UserAgent(class recon::ConversationManager *,class resip::SharedPtr<class recon::UserAgentMasterProfile>,void (__cdecl*)(unsigned int,int,char const *,int))" (??0UserAgent@recon@@QAE@PAVConversationManager@1@V?$SharedPtr@VUserAgentMasterProfile@recon@@@resip@@P6AXIHPBDH@Z@Z) 中被引用 我去recon项目下的UserAgent类中找到Security()方法,找到它的声明和定义。Security的声明在.h中,定义在.cpp中,它们在另一个项目中(resiprocate),并不在项目的根目录下在子文件下。于是我将resiprocate.lib链接到recon项目。由于recon属性中没有链接器这个属性,我只好把它添加到库管理器下如下图: 但是仍然错误。
second_lc 2013-11-11
  • 打赏
  • 举报
回复
比如说如下错误:
recon.lib(UserAgent.obj) : error LNK2019: 无法解析的外部符号 "public: __thiscall resip::Security::Security(class resip::Data const &,class resip::BaseSecurity::CipherList const &)" (??0Security@resip@@QAE@ABVData@1@ABVCipherList@BaseSecurity@1@@Z),该符号在函数 "public: __thiscall recon::UserAgent::UserAgent(class recon::ConversationManager *,class resip::SharedPtr<class recon::UserAgentMasterProfile>,void (__cdecl*)(unsigned int,int,char const *,int))" (??0UserAgent@recon@@QAE@PAVConversationManager@1@V?$SharedPtr@VUserAgentMasterProfile@recon@@@resip@@P6AXIHPBDH@Z@Z) 中被引用

我去recon项目下的UserAgent类中找到Security()方法,找到它的声明和定义。Security的声明在.h中,定义在.cpp中,它们在另一个项目中(resiprocate),并不在项目的根目录下在子文件下。于是我将resiprocate.lib链接到recon项目。由于recon属性中没有链接器这个属性,我只好把它添加到库管理器下如下图:

但是仍然错误。
图灵狗 2013-11-11
  • 打赏
  • 举报
回复
那就先解决错误的问题,应该是LIB没有链接上。
引用 3 楼 second_lc 的回复:
我知道调成Debug重新编译就可以了,但是Debug模式下,总是报错了啊。错误类型都是什么无法解析的外部符号。
second_lc 2013-11-11
  • 打赏
  • 举报
回复
我知道调成Debug重新编译就可以了,但是Debug模式下,总是报错了啊。错误类型都是什么无法解析的外部符号。

64,654

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧