简体   繁体   English

在调试或发布模式下使用DLL?

[英]Using DLL in debug or release mode?

I downloaded a precompiled SQLite DLL from http://www.sqlite.org at this link sqlite-dll-win32-x86-3080600.zip . 我从http://www.sqlite.org的链接sqlite-dll-win32-x86-3080600.zip下载了预编译的SQLite DLL。

Can I use the same DLL both in Debug and Release mode? 我可以在调试和发布模式下使用相同的DLL吗? What would be the difference and how is it possible? 有什么区别,怎么可能? I'm using Visual C++ 2012 Compiler. 我正在使用Visual C ++ 2012编译器。

For the DLL internals to be visible in debug mode, it has to be compiled in debug mode. 为了使DLL内部在调试模式下可见,必须在调试模式下对其进行编译。 Otherwise, no debug info will be available (eg 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. 另一方面,在调试模式下编译的DLL不应用于发布,因为它速度较慢并且包含不必要的代码。 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. 我不确定调试功能的存在是否会带来安全风险,但是在生产环境中的DLL中添加额外的钩子听起来并不安全。

Hope that helps! 希望有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM