在调试或释放模式下使用DLL? [英] Using DLL in debug or release mode?

查看:165
本文介绍了在调试或释放模式下使用DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从 http://www.sqlite.org 在此链接下载了一个预编译的SQLite DLL sqlite-dll-win32-x86-3080600.zip 。 p>

我可以在Debug和Release模式下使用相同的DLL吗?有什么区别,怎么可能?我使用Visual C ++ 2012编译器。

解决方案

为了使DLL内部在调试模式下可见,在调试模式。否则,没有调试信息可用(例如观察变量,步进等)。另一方面,在调试模式下编译的DLL不应该用于发布,因为它较慢并且包含不必要的代码。我不知道调试功能的存在是否构成安全风险,但在生产环境中的DLL中有额外的钩子并不安全。



希望帮助!


I downloaded a precompiled SQLite DLL from http://www.sqlite.org at this link sqlite-dll-win32-x86-3080600.zip.

Can I use the same DLL both in Debug and Release mode? What would be the difference and how is it possible? I'm using Visual C++ 2012 Compiler.

解决方案

For the DLL internals to be visible in debug mode, it has to be compiled in debug mode. Otherwise, no debug info will be available (e.g. watch variables, step into, etc.). On the other hand, a DLL compiled in debug mode shouldn't be used for release since it is slower and contains unnecessary code. I am not sure if the existence of the debug functions constitute a security risk, but having additional hooks in your DLL in a production environment doesn't sound safe.

Hope that helps!

这篇关于在调试或释放模式下使用DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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