在使用.lib和dll时如何显示调试中的源代码 [英] How to show source code in debug when using .lib and dll

查看:781
本文介绍了在使用.lib和dll时如何显示调试中的源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2005工作,
我有一部分freeimage源代码。我把它编译成.lib和dll。
当我调试程序时,我想进入freeimage源代码,但是vs2005不知道哪个代码是freeimage.lib freeimage.dll从中编译,我该如何让vs2005知道。
当我使用它的.lib和dll时,我想进入freeimage源代码。
非常感谢!

I am working in VS2005, I have a part of freeimage source code. I compile it into .lib and dll. When I debug the program, I want to step into freeimage source code ,however vs2005 do not know which code is the freeimage.lib freeimage.dll compiled from, How can I let vs2005 know it. I want to step into freeimage source code, when using its .lib and dll. Many thanks!

推荐答案

您需要在调试配置中构建代码并生成程序数据库文件(。 pdb),其中包含调试符号:
http ://msdn.microsoft.com/en-us/library/cyz1h6zd(VS.80).aspx

You need to build the code in a debug configuration and generate a program database file (.pdb) that contains the debug symbols: http://msdn.microsoft.com/en-us/library/cyz1h6zd(VS.80).aspx

然后运行应用程序时使用调试版本的dll,并确保Visual Studio可以看到.pdb文件。通常,如果一切都在一个解决方案中,它可以找到它,否则可以将.pdb文件放在与dll相同的目录中。

Then when you run the application use the debug version of the dll and make sure that Visual Studio can see the .pdb file. Usually if everything is in one solution it can find it, otherwise you can put the .pdb file into the same directory as the dll.

这篇关于在使用.lib和dll时如何显示调试中的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆