调试信息在vc ++ dll中找不到

时间:2011-10-05 05:10:18

标签: visual-studio-2008 debugging visual-c++ dll

我有一个DLL,我想调试我的DLL。我也浏览了exe的路径。但是现在我想改变那个exe的路径,因为它不是正确的exe。在属性中我删除了路径来自调试选项的exe也是。但是当我开始调试时,错误消息显示出来  无法找到或不匹配exe的调试信息.Binary未使用调试信息构建 输出窗口显示..............

'hello.exe': Loaded 'C:\Users\Acer\Desktop\dll_example\hello.exe', Binary was not built with debug information.
'hello.exe': Loaded 'C:\Windows\System32\ntdll.dll'
'hello.exe': Loaded 'C:\Windows\System32\kernel32.dll'
'hello.exe': Loaded 'C:\Windows\System32\KernelBase.dll'
'hello.exe': Loaded 'C:\Windows\System32\WinSCard.dll'
'hello.exe': Loaded 'C:\Windows\System32\msvcrt.dll'
'hello.exe': Loaded 'C:\Windows\System32\rpcrt4.dll'
'hello.exe': Loaded 'C:\Users\Acer\Desktop\dll_example\helloworld.dll'
'hello.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759cb\msvcr90.dll'
'hello.exe': Loaded 'C:\Windows\System32\user32.dll'
'hello.exe': Loaded 'C:\Windows\System32\gdi32.dll'
'hello.exe': Loaded 'C:\Windows\System32\lpk.dll'
'hello.exe': Loaded 'C:\Windows\System32\usp10.dll'
'hello.exe': Loaded 'C:\Windows\System32\comdlg32.dll'
'hello.exe': Loaded 'C:\Windows\System32\shlwapi.dll'
'hello.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7600.16661_none_ebfb56996c72aefc\comctl32.dll'
'hello.exe': Loaded 'C:\Windows\System32\advapi32.dll'
'hello.exe': Loaded 'C:\Windows\System32\sechost.dll'
'hello.exe': Loaded 'C:\Windows\System32\shell32.dll'
'hello.exe': Loaded 'C:\Windows\System32\winspool.drv'
'hello.exe': Loaded 'C:\Windows\System32\oledlg.dll'
'hello.exe': Loaded 'C:\Windows\System32\ole32.dll'
'hello.exe': Loaded 'C:\Windows\System32\olepro32.dll'
'hello.exe': Loaded 'C:\Windows\System32\oleaut32.dll'
The program '[0x1740] hello.exe: Native' has exited with code 0 (0x0).

1 个答案:

答案 0 :(得分:2)

来自“二进制文件未使用调试信息构建”。看来您的二进制文件是在“发布”配置中构建的。这里至少有两个选项:

i)在“Debug”配置中构建二进制文件

ii)更改项目设置,以便在发布配置中生成程序数据库文件(PDB)(例如,检查this)。 PDB文件应与EXE位于同一目录中,并且您应该能够调试应用程序。